lv_os.h

API reference for lv_os.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_os_private.h
Summary

Functions

lv_lock

Lock LVGL's general mutex. LVGL is not thread safe, so a mutex is used to avoid executing multiple LVGL functions at the same time from different threads. It shall be called when calling LVGL functions from threads different than lv_timer_handler's thread. It doesn't need to be called in LVGL events because they are called from lv_timer_handler(). It is called internally in lv_timer_handler().

 
void lv_lock(void)

lv_lock_isr

Same as lv_lock() but can be called from an interrupt.

 
lv_result_t lv_lock_isr(void)

Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_unlock

The pair of lv_lock() and lv_lock_isr(). It unlocks LVGL general mutex. It is called internally in lv_timer_handler().

 
void lv_unlock(void)

lv_sleep_ms

Sleeps the current thread by an amount of milliseconds.

 
void lv_sleep_ms(uint32_t ms)
Parameters
NameTypeDescription
msuint32_tamount of milliseconds to sleep the current thread.

Dependencies

How is this guide?

Last updated on

On this page