lv_os.h

Enums

enum lv_thread_prio_t

Values:

enumerator LV_THREAD_PRIO_LOWEST
enumerator LV_THREAD_PRIO_LOW
enumerator LV_THREAD_PRIO_MID
enumerator LV_THREAD_PRIO_HIGH
enumerator LV_THREAD_PRIO_HIGHEST

Functions

lv_result_t lv_thread_init(lv_thread_t *thread, lv_thread_prio_t prio, void (*callback)(void*), size_t stack_size, void *user_data)

Create a new thread

Parameters:
  • thread -- a variable in which the thread will be stored

  • prio -- priority of the thread

  • callback -- function of the thread

  • stack_size -- stack size in bytes

  • user_data -- arbitrary data, will be available in the callback

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_result_t lv_thread_delete(lv_thread_t *thread)

Delete a thread

Parameters:

thread -- the thread to delete

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_result_t lv_mutex_init(lv_mutex_t *mutex)

Create a mutex

Parameters:

mutex -- a variable in which the thread will be stored

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_result_t lv_mutex_lock(lv_mutex_t *mutex)

Lock a mutex

Parameters:

mutex -- the mutex to lock

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_result_t lv_mutex_lock_isr(lv_mutex_t *mutex)

Lock a mutex from interrupt

Parameters:

mutex -- the mutex to lock

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_result_t lv_mutex_unlock(lv_mutex_t *mutex)

Unlock a mutex

Parameters:

mutex -- the mutex to unlock

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_result_t lv_mutex_delete(lv_mutex_t *mutex)

Delete a mutex

Parameters:

mutex -- the mutex to delete

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_result_t lv_thread_sync_init(lv_thread_sync_t *sync)

Create a thread synchronization object

Parameters:

sync -- a variable in which the sync will be stored

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_result_t lv_thread_sync_wait(lv_thread_sync_t *sync)

Wait for a "signal" on a sync object

Parameters:

sync -- a sync object

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_result_t lv_thread_sync_signal(lv_thread_sync_t *sync)

Send a wake-up signal to a sync object

Parameters:

sync -- a sync object

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure

lv_result_t lv_thread_sync_delete(lv_thread_sync_t *sync)

Delete a sync object

Parameters:

sync -- a sync object to delete

Returns:

LV_RESULT_OK: success; LV_RESULT_INVALID: failure