1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00

Consider LV_TASK_PRIO_OFF when finding the delay till next run required

This commit is contained in:
Themba Dube 2019-12-10 20:09:22 -05:00
parent 3b4f648468
commit d20c4bb26a

View File

@ -168,9 +168,12 @@ LV_ATTRIBUTE_TASK_HANDLER uint32_t lv_task_handler(void)
time_till_next = LV_NO_TASK_READY;
next = lv_ll_get_head(&LV_GC_ROOT(_lv_task_ll));
while(next) {
uint32_t delay = lv_task_time_remaining(next);
if(delay < time_till_next)
time_till_next = delay;
if(next->prio != LV_TASK_PRIO_OFF) {
uint32_t delay = lv_task_time_remaining(next);
if(delay < time_till_next)
time_till_next = delay;
}
next = lv_ll_get_next(&LV_GC_ROOT(_lv_task_ll), next); /*Find the next task*/
}
already_running = false; /*Release the mutex*/