1# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
2# Copyright (c) 2020 Teslabs Engineering S.L.
3# SPDX-License-Identifier: Apache-2.0
4
5menu "Input device settings"
6
7DT_CHOSEN_Z_TOUCH := zephyr,touch
8DT_CHOSEN_Z_DISPLAY := zephyr,display
9
10config LV_Z_POINTER_FROM_CHOSEN_TOUCH
11	bool "Create LVGL pointer from DT 'zephyr,touch' chosen device"
12	depends on INPUT
13	depends on $(dt_chosen_enabled,$(DT_CHOSEN_Z_TOUCH))
14	default y if !DT_HAS_ZEPHYR_LVGL_POINTER_INPUT_ENABLED
15	help
16	  Enable creation of LVGL pointer input device
17	  based on 'zephyr,touch' chosen property in devicetree.
18
19config LV_Z_POINTER_FROM_CHOSEN_TOUCH_INFER_DISPLAY
20	bool "Link input pointer to chosen display"
21	depends on LV_Z_POINTER_FROM_CHOSEN_TOUCH
22	depends on $(dt_chosen_enabled,$(DT_CHOSEN_Z_DISPLAY))
23	default y
24	help
25	  Process input events of the pointer device created
26	  from the 'zephyr,touch' chosen property and link it to the
27	  'zephyr,display' chosen device.
28
29config LV_Z_POINTER_INPUT
30	bool "Input lvgl pointer"
31	default y
32	depends on INPUT
33	depends on DT_HAS_ZEPHYR_LVGL_POINTER_INPUT_ENABLED || LV_Z_POINTER_FROM_CHOSEN_TOUCH
34
35config LV_Z_POINTER_INPUT_MSGQ_COUNT
36	int "Input pointer queue message count"
37	default 10
38	depends on LV_Z_POINTER_INPUT
39	help
40	  Size of the pointer message queue buffering input events.
41
42config LV_Z_BUTTON_INPUT
43	bool "Input lvgl button"
44	default y
45	depends on INPUT
46	depends on DT_HAS_ZEPHYR_LVGL_BUTTON_INPUT_ENABLED
47
48config LV_Z_BUTTON_INPUT_MSGQ_COUNT
49	int "Input button queue message count"
50	default 4
51	depends on LV_Z_BUTTON_INPUT
52	help
53	  Size of the button message queue buffering input events.
54
55config LV_Z_ENCODER_INPUT
56	bool "Input lvgl encoder"
57	default y
58	depends on INPUT
59	depends on DT_HAS_ZEPHYR_LVGL_ENCODER_INPUT_ENABLED
60
61config LV_Z_ENCODER_INPUT_MSGQ_COUNT
62	int "Input encoder queue message count"
63	default 4
64	depends on LV_Z_ENCODER_INPUT
65	help
66	  Size of the encoder message queue buffering input events.
67
68config LV_Z_KEYPAD_INPUT
69	bool "Input lvgl keypad"
70	default y
71	depends on INPUT
72	depends on DT_HAS_ZEPHYR_LVGL_KEYPAD_INPUT_ENABLED
73
74config LV_Z_KEYPAD_INPUT_MSGQ_COUNT
75	int "Input keypad queue message count"
76	default 4
77	depends on LV_Z_KEYPAD_INPUT
78	help
79	  Size of the keypad message queue buffering input events.
80
81endmenu
82