Skip to content

Commit 5bcb524

Browse files
gschwaerfabiobaltieri
authored andcommitted
modules: lvgl: fix multiple LVGL inputs
The LVGL input callback does not use an instance specific name, so we can only ever have one instance of this type. This issue was evident by a build error, e.g., when using "zephyr,lvgl-keypad-input" nodes twice: error: redefinition of '_input_callback__lvgl_keypad_process_event' Signed-off-by: Gero Schwäricke <[email protected]>
1 parent 6ba6c66 commit 5bcb524

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/lvgl/include/lvgl_common_input.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ int lvgl_init_input_devices(void);
3636
#define LVGL_KEY_VALID(key) IN_RANGE(key, 0, UINT8_MAX)
3737

3838
#define LVGL_INPUT_DEFINE(inst, type, msgq_size, process_evt_cb) \
39-
INPUT_CALLBACK_DEFINE(LVGL_INPUT_DEVICE(inst), process_evt_cb, \
40-
(void *)DEVICE_DT_INST_GET(inst)); \
39+
INPUT_CALLBACK_DEFINE_NAMED(LVGL_INPUT_DEVICE(inst), process_evt_cb, \
40+
(void *)DEVICE_DT_INST_GET(inst), process_evt_cb_##inst); \
4141
K_MSGQ_DEFINE(lvgl_input_msgq_##type##_##inst, sizeof(lv_indev_data_t), msgq_size, 4)
4242

4343
#ifdef __cplusplus

0 commit comments

Comments
 (0)