lv_timer.h
API reference for lv_timer.h
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_timer_private.h
Summary
Functions
misc/lv_timer.h:73function
lv_timer_handler_set_resume_cb
Set the resume callback to the timer handler
void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void *data)| Name | Type | Description |
|---|---|---|
cb | lv_timer_handler_resume_cb_t | the function to call when timer handler is resumed |
data | void * | pointer to a resume data |
misc/lv_timer.h:117function
lv_timer_set_cb
Set the callback to the timer (the function to call periodically)
void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb)| Name | Type | Description |
|---|---|---|
timer | lv_timer_t * | pointer to a timer |
timer_cb | lv_timer_cb_t | the function to call periodically |
misc/lv_timer.h:124function
lv_timer_set_period
Set new period for a lv_timer
void lv_timer_set_period(lv_timer_t *timer, uint32_t period)| Name | Type | Description |
|---|---|---|
timer | lv_timer_t * | pointer to a lv_timer |
period | uint32_t | the new period |
misc/lv_timer.h:137function
lv_timer_set_repeat_count
Set the number of times a timer will repeat.
void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count)| Name | Type | Description |
|---|---|---|
timer | lv_timer_t * | pointer to a lv_timer. |
repeat_count | int32_t | -1 : infinity; 0 : stop ; n>0: residual times |
misc/lv_timer.h:144function
lv_timer_set_auto_delete
Set whether a lv_timer will be deleted automatically when it is called repeat_count times.
void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete)| Name | Type | Description |
|---|---|---|
timer | lv_timer_t * | pointer to a lv_timer. |
auto_delete | bool | true: auto delete; false: timer will be paused when it is called repeat_count times. |
misc/lv_timer.h:151function
lv_timer_set_user_data
Set custom parameter to the lv_timer.
void lv_timer_set_user_data(lv_timer_t *timer, void *user_data)| Name | Type | Description |
|---|---|---|
timer | lv_timer_t * | pointer to a lv_timer. |
user_data | void * | custom parameter |
misc/lv_timer.h:212function
lv_timer_set_external_data
Attaches external user data and destructor callback to a timer object.
Associates custom user data with an LVGL timer and specifies a destructor function that will be automatically invoked when the timer is deleted to properly clean up the associated resources.
void lv_timer_set_external_data(lv_timer_t *timer, void *data, void(*free_cb)(void *data))| Name | Type | Description |
|---|---|---|
timer | lv_timer_t * | Pointer to the timer object |
data | void * | User-defined data pointer to associate with the timer |
free_cb | void(*)(void *data) |
Typedefs
misc/lv_timer.h:36typedef
lv_timer_cb_t
typedef void(* lv_timer_cb_t) (lv_timer_t *)Timers execute this type of functions.
Used by 2 functions
lv_timer_create— paramtimer_xcblv_timer_set_cb— paramtimer_cb
misc/lv_timer.h:41typedef
lv_timer_handler_resume_cb_t
typedef void(* lv_timer_handler_resume_cb_t) (void *data)Timer handler resume this type of function.
Used by 1 function
lv_timer_handler_set_resume_cb— paramcb
Macros
misc/lv_timer.h:27macro
LV_NO_TIMER_READY
#define LV_NO_TIMER_READY 0xFFFFFFFFDependencies
How is this guide?
Last updated on