Skip to content

Commit ff2cf4b

Browse files
faxe1008kartben
authored andcommitted
modules: lvgl: Update OSAL implementation
The LVGL OSAL also tries to set the name of threads. Adjust the function signature accordingly. Also deal with the fact that the type `lv_thread_prio_t` is not part of the private api and requires a LV_USE_PRIVATE_API symbol to be enabled. Signed-off-by: Fabian Blatz <[email protected]>
1 parent 5447252 commit ff2cf4b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

modules/lvgl/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ config LV_CONF_SKIP
2222
bool
2323
default n
2424

25+
config LV_USE_PRIVATE_API
26+
bool
27+
2528
config LV_USE_LOG
2629
bool
2730

@@ -158,6 +161,7 @@ config LV_DRAW_DMA2D_HAL_INCLUDE
158161
config LV_Z_USE_OSAL
159162
bool "Use OSAL enabling parallel rendering"
160163
depends on DYNAMIC_THREAD
164+
select LV_USE_PRIVATE_API
161165
help
162166
Use the Zephyr LVGL OSAL to enable parallel rendering
163167
pipelines.

modules/lvgl/lvgl_zephyr_osal.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ LOG_MODULE_DECLARE(lvgl, CONFIG_LV_Z_LOG_LEVEL);
1313
typedef void (*lv_thread_entry)(void *);
1414
static void thread_entry(void *thread, void *cb, void *user_data);
1515

16-
lv_result_t lv_thread_init(lv_thread_t *thread, lv_thread_prio_t prio, void (*callback)(void *),
17-
size_t stack_size, void *user_data)
16+
lv_result_t lv_thread_init(lv_thread_t *thread, const char *const name, lv_thread_prio_t prio,
17+
void (*callback)(void *), size_t stack_size, void *user_data)
1818
{
1919
int thread_priority;
2020

@@ -29,6 +29,8 @@ lv_result_t lv_thread_init(lv_thread_t *thread, lv_thread_prio_t prio, void (*ca
2929
thread->tid = k_thread_create(&thread->thread, thread->stack, stack_size, thread_entry,
3030
thread, callback, user_data, thread_priority, 0, K_NO_WAIT);
3131

32+
k_thread_name_set(thread->tid, name);
33+
3234
return LV_RESULT_OK;
3335
}
3436

0 commit comments

Comments
 (0)