feat(rt-thread): allow users to control refresh period in the lvgl thread (#3375)

This commit is contained in:
Man, Jianting (Meco)
2022-05-22 08:45:49 -04:00
committed by GitHub
parent 4e06025e1d
commit c63d12f6da
2 changed files with 5 additions and 1 deletions

View File

@@ -36,6 +36,10 @@
#define LV_TICK_CUSTOM_INCLUDE LV_RTTHREAD_INCLUDE
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (rt_tick_get_millisecond()) /*Expression evaluating to current system time in ms*/
#ifdef PKG_LVGL_DISP_REFR_PERIOD
#define LV_DISP_DEF_REFR_PERIOD PKG_LVGL_DISP_REFR_PERIOD
#endif
/*=======================
* FEATURE CONFIGURATION
*=======================*/

View File

@@ -54,7 +54,7 @@ static void lvgl_thread_entry(void *parameter)
while(1)
{
lv_task_handler();
rt_thread_mdelay(10);
rt_thread_mdelay(LV_DISP_DEF_REFR_PERIOD);
}
}