Skip to content

Commit 8561e9a

Browse files
faxe1008github-actions[bot]
authored andcommitted
modules: lvgl: Register print callback after lv_init
Move initialization of the print callback handler after calling lv_init, as the latter zeroes the global callback structure. Signed-off-by: Fabian Blatz <[email protected]> (cherry picked from commit 5cffb8e)
1 parent 4189364 commit 8561e9a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/lvgl/lvgl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,13 @@ int lvgl_init(void)
232232
return -ENODEV;
233233
}
234234

235+
lv_init();
236+
lv_tick_set_cb(k_uptime_get_32);
237+
235238
#if CONFIG_LV_Z_LOG_LEVEL != 0
236239
lv_log_register_print_cb(lvgl_log);
237240
#endif
238241

239-
lv_init();
240-
lv_tick_set_cb(k_uptime_get_32);
241-
242242
#ifdef CONFIG_LV_Z_USE_FILESYSTEM
243243
lvgl_fs_init();
244244
#endif

0 commit comments

Comments
 (0)