lv_os_private.h
API reference for lv_os_private.h
Functions
lv_os_get_idle_percent
Set it for LV_SYSMON_GET_IDLE to show the CPU usage
uint32_t lv_os_get_idle_percent(void)Returns: uint32_t — the idle percentage since the last call
lv_os_init
Initialize the OS layer
void lv_os_init(void)lv_thread_init
Create a new thread
lv_result_t lv_thread_init(lv_thread_t *thread, const char *const name, lv_thread_prio_t prio, void(*callback)(void *), size_t stack_size, void *user_data)| Name | Type | Description |
|---|---|---|
thread | lv_thread_t * | a variable in which the thread will be stored |
name | const char *const | the name of the thread |
prio | lv_thread_prio_t | priority of the thread |
callback | void(*)(void *) | function of the thread |
stack_size | size_t | stack size in bytes |
user_data | void * | arbitrary data, will be available in the callback May be NULL. |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_thread_delete
Delete a thread
lv_result_t lv_thread_delete(lv_thread_t *thread)| Name | Type | Description |
|---|---|---|
thread | lv_thread_t * | the thread to delete |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_mutex_init
Create a mutex
lv_result_t lv_mutex_init(lv_mutex_t *mutex)| Name | Type | Description |
|---|---|---|
mutex | lv_mutex_t * | a variable in which the thread will be stored |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_mutex_lock
Lock a mutex
lv_result_t lv_mutex_lock(lv_mutex_t *mutex)| Name | Type | Description |
|---|---|---|
mutex | lv_mutex_t * | the mutex to lock |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_mutex_lock_isr
Lock a mutex from interrupt
lv_result_t lv_mutex_lock_isr(lv_mutex_t *mutex)| Name | Type | Description |
|---|---|---|
mutex | lv_mutex_t * | the mutex to lock |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_mutex_unlock
Unlock a mutex
lv_result_t lv_mutex_unlock(lv_mutex_t *mutex)| Name | Type | Description |
|---|---|---|
mutex | lv_mutex_t * | the mutex to unlock |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_mutex_delete
Delete a mutex
lv_result_t lv_mutex_delete(lv_mutex_t *mutex)| Name | Type | Description |
|---|---|---|
mutex | lv_mutex_t * | the mutex to delete |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_thread_sync_init
Create a thread synchronization object
lv_result_t lv_thread_sync_init(lv_thread_sync_t *sync)| Name | Type | Description |
|---|---|---|
sync | lv_thread_sync_t * | a variable in which the sync will be stored |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_thread_sync_wait
Wait for a "signal" on a sync object
lv_result_t lv_thread_sync_wait(lv_thread_sync_t *sync)| Name | Type | Description |
|---|---|---|
sync | lv_thread_sync_t * | a sync object |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_thread_sync_signal
Send a wake-up signal to a sync object
lv_result_t lv_thread_sync_signal(lv_thread_sync_t *sync)| Name | Type | Description |
|---|---|---|
sync | lv_thread_sync_t * | a sync object |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_thread_sync_signal_isr
Send a wake-up signal to a sync object from interrupt
lv_result_t lv_thread_sync_signal_isr(lv_thread_sync_t *sync)| Name | Type | Description |
|---|---|---|
sync | lv_thread_sync_t * | a sync object |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
lv_thread_sync_delete
Delete a sync object
lv_result_t lv_thread_sync_delete(lv_thread_sync_t *sync)| Name | Type | Description |
|---|---|---|
sync | lv_thread_sync_t * | a sync object to delete |
Returns: lv_result_t — LV_RESULT_OK: success; LV_RESULT_INVALID: failure
Enums
lv_thread_prio_t
| Name |
|---|
LV_THREAD_PRIO_LOWEST |
LV_THREAD_PRIO_LOW |
LV_THREAD_PRIO_MID |
LV_THREAD_PRIO_HIGH |
LV_THREAD_PRIO_HIGHEST |
Used by 1 function
lv_thread_init— paramprio
Dependencies
lvgl_public.hlv_pthread.h
lv_global.hlv_draw_private.hlv_draw_sdl.hlv_font_fmt_txt_private.hlvgl_private.hlv_cache.hlv_freertos.hlv_linux.hlv_mqx.hlv_tlsf_private.h
Last updated on