1# Copyright (c) 2023 Fabian Blatz <fabianblatz@gmail.com>
2# Copyright 2023 NXP
3# SPDX-License-Identifier: Apache-2.0
4
5config ZEPHYR_LVGL_MODULE
6	bool
7
8config LVGL
9	bool "LVGL support"
10	help
11	  This option enables the LVGL graphics library.
12
13if LVGL
14
15config LV_USE_MONKEY
16	bool
17
18config LV_DPI_DEF
19	int
20
21config LV_CONF_SKIP
22	bool
23	default n
24
25config LV_USE_PRIVATE_API
26	bool
27
28config LV_USE_LOG
29	bool
30
31config LV_LOG_LEVEL_NONE
32	bool
33
34config LV_LOG_LEVEL_ERROR
35	bool
36
37config LV_LOG_LEVEL_WARN
38	bool
39
40config LV_LOG_LEVEL_INFO
41	bool
42
43config LV_LOG_LEVEL_USER
44	bool
45
46config LV_LOG_LEVEL_TRACE
47	bool
48
49config LV_Z_LOG_LEVEL
50	int
51	default 0 if LV_LOG_LEVEL_NONE || !LV_USE_LOG
52	default 1 if LV_LOG_LEVEL_ERROR
53	default 2 if LV_LOG_LEVEL_WARN
54	default 3 if LV_LOG_LEVEL_INFO
55	default 3 if LV_LOG_LEVEL_USER
56	default 4 if LV_LOG_LEVEL_TRACE
57
58config LV_Z_USE_ROUNDER_CB
59	bool
60	default y if LV_Z_AREA_X_ALIGNMENT_WIDTH != 1 || LV_Z_AREA_Y_ALIGNMENT_WIDTH != 1
61
62config APP_LINK_WITH_LVGL
63	bool "Link 'app' with LVGL"
64	default y
65	help
66	  Add LVGL header files to the 'app' include path. It may be
67	  disabled if the include paths for LVGL are causing aliasing
68	  issues for 'app'.
69
70config LV_Z_USE_FILESYSTEM
71	bool "LVGL file system support"
72	depends on FILE_SYSTEM
73	default y if FILE_SYSTEM
74	help
75	  Enable LittlevGL file system
76
77choice LV_COLOR_DEPTH
78	default LV_COLOR_DEPTH_16
79	prompt "Color depth (bits per pixel)"
80
81	config LV_COLOR_DEPTH_32
82		bool "32: ARGB8888"
83	config LV_COLOR_DEPTH_24
84		bool "24: RGB888"
85	config LV_COLOR_DEPTH_16
86		bool "16: RGB565"
87	config LV_COLOR_DEPTH_8
88		bool "8: RGB232"
89	config LV_COLOR_DEPTH_1
90		bool "1: monochrome"
91endchoice
92
93config LV_COLOR_16_SWAP
94	bool "Swap the 2 bytes of RGB565 color."
95	depends on LV_COLOR_DEPTH_16
96
97config LV_Z_FLUSH_THREAD
98	bool "Flush LVGL frames in a separate thread"
99	help
100	  Flush LVGL frames in a separate thread, while the primary thread
101	  renders the next LVGL frame. Can be disabled if the performance
102	  gain this approach offers is not required
103
104if LV_Z_FLUSH_THREAD
105
106config LV_Z_FLUSH_THREAD_STACK_SIZE
107	int "Stack size for flushing thread"
108	default 1024
109	help
110	  Stack size for LVGL flush thread, which will call display_write
111
112config LV_Z_FLUSH_THREAD_PRIORITY
113	int "LVGL flush thread priority"
114	default -1
115	help
116	  Priority of LVGL flush thread.
117
118endif # LV_Z_FLUSH_THREAD
119
120config LV_Z_AREA_X_ALIGNMENT_WIDTH
121	int "Frame X alignment size"
122	default 1
123	help
124	  Number of pixels, X axis should be rounded to. Should be used to override
125	  the current frame dimensions to meet display and/or LCD host
126	  controller requirements. The value must be power of 2.
127
128config LV_Z_AREA_Y_ALIGNMENT_WIDTH
129	int "Frame Y alignment size"
130	default 1
131	help
132	  Number of pixels, Y axis should be rounded to. Should be used to override
133	  the current frame dimensions to meet display and/or LCD host
134	  controller requirements. The value must be power of 2.
135
136config LV_Z_AUTO_INIT
137	bool "Initialize LVGL before application startup"
138	default y
139	help
140	  Configure LVGL callbacks and display initialization before the application starts.
141	  This can be useful to disable if you need to change a display's pixel format
142	  prior to initialization. If using static allocation, ensure that LV_Z_BITS_PER_PIXEL
143	  is set correctly.
144
145config LV_Z_INIT_PRIORITY
146	int "Default init priority for LVGL"
147	default 90
148	depends on LV_Z_AUTO_INIT
149	help
150	  Priority used for the automatic initialization of LVGL.
151
152config LV_USE_DRAW_DMA2D
153	bool
154
155config LV_DRAW_DMA2D_HAL_INCLUDE
156	string
157	help
158	  Must be defined to include path of CMSIS header of target processor
159	  e.g. "stm32f769xx.h" or "stm32f429xx.h"
160
161config LV_Z_USE_OSAL
162	bool "Use OSAL enabling parallel rendering"
163	depends on DYNAMIC_THREAD
164	select LV_USE_PRIVATE_API
165	help
166	  Use the Zephyr LVGL OSAL to enable parallel rendering
167	  pipelines.
168
169config LV_USE_PXP
170	bool
171
172config LV_USE_GPU_NXP_PXP
173	bool
174	default y if LV_USE_PXP
175
176config LV_Z_PXP_INTERRUPT_PRIORITY
177	int "PXP interrupt priority"
178	depends on LV_USE_PXP
179	default 3
180	help
181	  Sets the interrupt priority for PXP
182
183rsource "Kconfig.memory"
184rsource "Kconfig.input"
185rsource "Kconfig.shell"
186
187
188endif
189