/*================================================================= EDIT HISTORY FOR MODULE This section contains comments describing changes made to the module. Notice that changes are listed in reverse chronological order. WHEN WHO WHAT, WHERE, WHY ------------ ------- ------------------------------------------------------------------------------- =================================================================*/ #ifndef _LVGL_DEMO_H #define _LVGL_DEMO_H #include "ql_api_osi.h" #ifdef __cplusplus extern "C" { #endif /*=========================================================================== * Enumeration Definition ===========================================================================*/ /*=========================================================================== * Struct ===========================================================================*/ /*=========================================================================== * Functions declaration ===========================================================================*/ void ql_lvgl_app_init(void); /** * \brief forward declaration */ struct _lv_indev_t; /** * \brief function prototype for gui creation */ typedef void (*lvGuiCreate_t)(void); /** * \brief start gui based on littlevgl * * It will create gui thread, initialize littlevgl, and optional call gui * creation function \p create. * * LCD should be initialized before this, back light should be enabled. And * usually quick logo has been shown. Gui thread will blit to LCD directly. * * \param create gui creation function */ void lvGuiInit(lvGuiCreate_t create); /** * \brief terminate littlevgl gui * * Most likely, it won't be called. */ void lvGuiDeinit(void); /** * \brief get keypad input device * \return * - keypad device */ struct _lv_indev_t *lvGuiGetKeyPad(void); ///** // * \brief schedule a callback to be executed in gui thread // * // * \param cb callback function // * \param param callback parameter // */ //void lvGuiThreadCallback(osiCallback_t cb, void *param); /** * \brief send event to gui thread */ void lvGuiSendEvent(ql_event_t *evt); /** * \brief request screen on * * It is for an application to request the screen on even there are no * user inputs. * * \p id is the identification of application. In the system, it should * be unique. Internally, 32bits bitmap is used to record this. So, it * should be inside [0,31]. * * The request is not counting. That is, for a given application id, * event there are multiple calls, single call of \p lvGuiReleaseScreenOn * will clear the request. * * \param id application id * \return * - true on success * - false on invalid parameter */ bool lvGuiRequestSceenOn(uint8_t id); /** * \brief release screen on request * * \param id application id * \return * - true on success * - false on invalid parameter */ bool lvGuiReleaseScreenOn(uint8_t id); /** * \brief turn on screen * * When screen is already turned on, it will do nothing. */ void lvGuiScreenOn(void); /** * \brief turn off screen * * When screen is already turned off, it will do nothing. */ void lvGuiScreenOff(void); /** * \brief set screen off timeout at inactive * * It can change the default value. When \p timeout is 0, screen won't be * turned off by inactive timeout. * * \param timeout inactive screen off timeout, 0 for never timeout */ void lvGuiSetInactiveTimeout(unsigned timeout); /** * \brief set whether animation is regarded as inactive * * When \p inactive is true, animation update won't be regarded as *active*. * The inactive screen off timer will still count down even there are * animations. Otherwise, inactive screen off timer will stop counting when * there are animation. * * \param inactive animation will be regarded as inactive */ void lvGuiSetAnimationInactive(bool inactive); #ifdef __cplusplus } /*"C" */ #endif #endif /* _LCDDEMO_H */