1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

Add lv_task_get_next

This commit is contained in:
Gabor Kiss-Vamosi 2020-07-08 09:28:35 +02:00
parent 5f4c26cb79
commit 843555a4b1
2 changed files with 18 additions and 0 deletions

View File

@ -378,6 +378,17 @@ uint8_t lv_task_get_idle(void)
return idle_last;
}
/**
* Iterate through the tasks
* @param task NULL to start iteration or the previous return value to get the next task
* @return the next task or NULL if there is no more task
*/
lv_task_t * lv_task_get_next(lv_task_t * task)
{
if(task == NULL) return _lv_ll_get_head(&LV_GC_ROOT(_lv_task_ll));
else return _lv_ll_get_next(&LV_GC_ROOT(_lv_task_ll), task);
}
/**********************
* STATIC FUNCTIONS
**********************/

View File

@ -165,6 +165,13 @@ void lv_task_enable(bool en);
*/
uint8_t lv_task_get_idle(void);
/**
* Iterate through the tasks
* @param task NULL to start iteration or the previous return value to get the next task
* @return the next task or NULL if there is no more task
*/
lv_task_t * lv_task_get_next(lv_task_t * task);
/**********************
* MACROS
**********************/