lv_tick.h
API reference for lv_tick.h
Provide access to the system tick with 1 millisecond resolution
Functions
lv_delay_set_cb
Set a callback for a blocking delay
void lv_delay_set_cb(lv_delay_cb_t cb)| Name | Type | Description |
|---|---|---|
cb | lv_delay_cb_t | pointer to a callback |
lv_tick_set_cb
Set the custom callback for 'lv_tick_get'
void lv_tick_set_cb(lv_tick_get_cb_t cb)| Name | Type | Description |
|---|---|---|
cb | lv_tick_get_cb_t | call this callback on 'lv_tick_get' |
lv_tick_get
Get the elapsed milliseconds since start up
uint32_t lv_tick_get(void)Returns: uint32_t — the elapsed milliseconds
lv_tick_get_cb
Get the custom callback for 'lv_tick_get'
lv_tick_get_cb_t lv_tick_get_cb(void)Returns: lv_tick_get_cb_t — call this callback on 'lv_tick_get'
lv_tick_inc
You have to call this function periodically. It is typically safe to call from an interrupt handler or a different thread.
void lv_tick_inc(uint32_t tick_period)| Name | Type | Description |
|---|---|---|
tick_period | uint32_t | the call period of this function in milliseconds |
lv_tick_elaps
Get the elapsed milliseconds since a previous time stamp
uint32_t lv_tick_elaps(uint32_t prev_tick)| Name | Type | Description |
|---|---|---|
prev_tick | uint32_t | a previous time stamp (return value of lv_tick_get() ) |
Returns: uint32_t — the elapsed milliseconds since 'prev_tick'
lv_tick_diff
Get the elapsed milliseconds between two time stamps
uint32_t lv_tick_diff(uint32_t tick, uint32_t prev_tick)| Name | Type | Description |
|---|---|---|
tick | uint32_t | a time stamp |
prev_tick | uint32_t | a time stamp before tick |
Returns: uint32_t — the elapsed milliseconds between prev_tick and tick
lv_delay_ms
Delay for the given milliseconds. By default it's a blocking delay, but with lv_delay_set_cb() a custom delay function can be set too
void lv_delay_ms(uint32_t ms)| Name | Type | Description |
|---|---|---|
ms | uint32_t | the number of milliseconds to delay |
Typedefs
lv_tick_get_cb_t
typedef uint32_t(* lv_tick_get_cb_t) (void)Used by 1 function
lv_tick_set_cb— paramcb
lv_delay_cb_t
typedef void(* lv_delay_cb_t) (uint32_t ms)Used by 1 function
lv_delay_set_cb— paramcb
Dependencies
Last updated on