1 /**
2  * GENERATED FILE, DO NOT EDIT IT!
3  * @file lv_conf_internal.h
4  * This file ensures all defines of lv_conf.h have a default value.
5  */
6 
7 #ifndef LV_CONF_INTERNAL_H
8 #define LV_CONF_INTERNAL_H
9 /* clang-format off */
10 
11 /* Config options */
12 #define LV_OS_NONE          0
13 #define LV_OS_PTHREAD       1
14 #define LV_OS_FREERTOS      2
15 #define LV_OS_CMSIS_RTOS2   3
16 #define LV_OS_RTTHREAD      4
17 #define LV_OS_WINDOWS       5
18 #define LV_OS_MQX           6
19 #define LV_OS_SDL2          7
20 #define LV_OS_CUSTOM        255
21 
22 #define LV_STDLIB_BUILTIN           0
23 #define LV_STDLIB_CLIB              1
24 #define LV_STDLIB_MICROPYTHON       2
25 #define LV_STDLIB_RTTHREAD          3
26 #define LV_STDLIB_CUSTOM            255
27 
28 #define LV_DRAW_SW_ASM_NONE         0
29 #define LV_DRAW_SW_ASM_NEON         1
30 #define LV_DRAW_SW_ASM_HELIUM       2
31 #define LV_DRAW_SW_ASM_CUSTOM       255
32 
33 #define LV_NEMA_HAL_CUSTOM          0
34 #define LV_NEMA_HAL_STM32           1
35 
36 /** Handle special Kconfig options. */
37 #ifndef LV_KCONFIG_IGNORE
38     #include "lv_conf_kconfig.h"
39     #if defined(CONFIG_LV_CONF_SKIP) && !defined(LV_CONF_SKIP)
40         #define LV_CONF_SKIP
41     #endif
42 #endif
43 
44 /* If "lv_conf.h" is available from here try to use it later. */
45 #ifdef __has_include
46     #if __has_include("lv_conf.h")
47         #ifndef LV_CONF_INCLUDE_SIMPLE
48             #define LV_CONF_INCLUDE_SIMPLE
49         #endif
50     #endif
51 #endif
52 
53 /* If lv_conf.h is not skipped, include it. */
54 #if !defined(LV_CONF_SKIP) || defined(LV_CONF_PATH)
55     #ifdef LV_CONF_PATH                           /* If there is a path defined for lv_conf.h, use it */
56         #include LV_CONF_PATH                     /* Note: Make sure to define custom CONF_PATH as a string */
57     #elif defined(LV_CONF_INCLUDE_SIMPLE)         /* Or simply include lv_conf.h is enabled. */
58         #include "lv_conf.h"
59     #else
60         #include "../../lv_conf.h"                /* Else assume lv_conf.h is next to the lvgl folder. */
61     #endif
62     #if !defined(LV_CONF_H) && !defined(LV_CONF_SUPPRESS_DEFINE_CHECK)
63         /* #include will sometimes silently fail when __has_include is used */
64         /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80753 */
65         #pragma message("Possible failure to include lv_conf.h, please read the comment in this file if you get errors")
66     #endif
67 #endif
68 
69 /* Renamed config backwards-compatibility */
70 #if !defined(LV_FS_DEFAULT_DRIVER_LETTER) && defined(LV_FS_DEFAULT_DRIVE_LETTER)
71     #define LV_FS_DEFAULT_DRIVER_LETTER LV_FS_DEFAULT_DRIVE_LETTER
72 #endif
73 
74 #ifdef CONFIG_LV_COLOR_DEPTH
75     #define LV_KCONFIG_PRESENT
76 #endif
77 
78 /*----------------------------------
79  * Start parsing lv_conf_template.h
80  -----------------------------------*/
81 
82 /* If you need to include anything here, do it inside the `__ASSEMBLY__` guard */
83 #if  0 && defined(__ASSEMBLY__)
84 #include "my_include.h"
85 #endif
86 
87 /*====================
88    COLOR SETTINGS
89  *====================*/
90 
91 /** Color depth: 1 (I1), 8 (L8), 16 (RGB565), 24 (RGB888), 32 (XRGB8888) */
92 #ifndef LV_COLOR_DEPTH
93     #ifdef CONFIG_LV_COLOR_DEPTH
94         #define LV_COLOR_DEPTH CONFIG_LV_COLOR_DEPTH
95     #else
96         #define LV_COLOR_DEPTH 16
97     #endif
98 #endif
99 
100 /*=========================
101    STDLIB WRAPPER SETTINGS
102  *=========================*/
103 
104 /** Possible values
105  * - LV_STDLIB_BUILTIN:     LVGL's built in implementation
106  * - LV_STDLIB_CLIB:        Standard C functions, like malloc, strlen, etc
107  * - LV_STDLIB_MICROPYTHON: MicroPython implementation
108  * - LV_STDLIB_RTTHREAD:    RT-Thread implementation
109  * - LV_STDLIB_CUSTOM:      Implement the functions externally
110  */
111 #ifndef LV_USE_STDLIB_MALLOC
112     #ifdef CONFIG_LV_USE_STDLIB_MALLOC
113         #define LV_USE_STDLIB_MALLOC CONFIG_LV_USE_STDLIB_MALLOC
114     #else
115         #define LV_USE_STDLIB_MALLOC    LV_STDLIB_BUILTIN
116     #endif
117 #endif
118 
119 /** Possible values
120  * - LV_STDLIB_BUILTIN:     LVGL's built in implementation
121  * - LV_STDLIB_CLIB:        Standard C functions, like malloc, strlen, etc
122  * - LV_STDLIB_MICROPYTHON: MicroPython implementation
123  * - LV_STDLIB_RTTHREAD:    RT-Thread implementation
124  * - LV_STDLIB_CUSTOM:      Implement the functions externally
125  */
126 #ifndef LV_USE_STDLIB_STRING
127     #ifdef CONFIG_LV_USE_STDLIB_STRING
128         #define LV_USE_STDLIB_STRING CONFIG_LV_USE_STDLIB_STRING
129     #else
130         #define LV_USE_STDLIB_STRING    LV_STDLIB_BUILTIN
131     #endif
132 #endif
133 
134 /** Possible values
135  * - LV_STDLIB_BUILTIN:     LVGL's built in implementation
136  * - LV_STDLIB_CLIB:        Standard C functions, like malloc, strlen, etc
137  * - LV_STDLIB_MICROPYTHON: MicroPython implementation
138  * - LV_STDLIB_RTTHREAD:    RT-Thread implementation
139  * - LV_STDLIB_CUSTOM:      Implement the functions externally
140  */
141 #ifndef LV_USE_STDLIB_SPRINTF
142     #ifdef CONFIG_LV_USE_STDLIB_SPRINTF
143         #define LV_USE_STDLIB_SPRINTF CONFIG_LV_USE_STDLIB_SPRINTF
144     #else
145         #define LV_USE_STDLIB_SPRINTF   LV_STDLIB_BUILTIN
146     #endif
147 #endif
148 
149 #ifndef LV_STDINT_INCLUDE
150     #ifdef CONFIG_LV_STDINT_INCLUDE
151         #define LV_STDINT_INCLUDE CONFIG_LV_STDINT_INCLUDE
152     #else
153         #define LV_STDINT_INCLUDE       <stdint.h>
154     #endif
155 #endif
156 #ifndef LV_STDDEF_INCLUDE
157     #ifdef CONFIG_LV_STDDEF_INCLUDE
158         #define LV_STDDEF_INCLUDE CONFIG_LV_STDDEF_INCLUDE
159     #else
160         #define LV_STDDEF_INCLUDE       <stddef.h>
161     #endif
162 #endif
163 #ifndef LV_STDBOOL_INCLUDE
164     #ifdef CONFIG_LV_STDBOOL_INCLUDE
165         #define LV_STDBOOL_INCLUDE CONFIG_LV_STDBOOL_INCLUDE
166     #else
167         #define LV_STDBOOL_INCLUDE      <stdbool.h>
168     #endif
169 #endif
170 #ifndef LV_INTTYPES_INCLUDE
171     #ifdef CONFIG_LV_INTTYPES_INCLUDE
172         #define LV_INTTYPES_INCLUDE CONFIG_LV_INTTYPES_INCLUDE
173     #else
174         #define LV_INTTYPES_INCLUDE     <inttypes.h>
175     #endif
176 #endif
177 #ifndef LV_LIMITS_INCLUDE
178     #ifdef CONFIG_LV_LIMITS_INCLUDE
179         #define LV_LIMITS_INCLUDE CONFIG_LV_LIMITS_INCLUDE
180     #else
181         #define LV_LIMITS_INCLUDE       <limits.h>
182     #endif
183 #endif
184 #ifndef LV_STDARG_INCLUDE
185     #ifdef CONFIG_LV_STDARG_INCLUDE
186         #define LV_STDARG_INCLUDE CONFIG_LV_STDARG_INCLUDE
187     #else
188         #define LV_STDARG_INCLUDE       <stdarg.h>
189     #endif
190 #endif
191 
192 #if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
193     /** Size of memory available for `lv_malloc()` in bytes (>= 2kB) */
194     #ifndef LV_MEM_SIZE
195         #ifdef CONFIG_LV_MEM_SIZE
196             #define LV_MEM_SIZE CONFIG_LV_MEM_SIZE
197         #else
198             #define LV_MEM_SIZE (64 * 1024U)          /**< [bytes] */
199         #endif
200     #endif
201 
202     /** Size of the memory expand for `lv_malloc()` in bytes */
203     #ifndef LV_MEM_POOL_EXPAND_SIZE
204         #ifdef CONFIG_LV_MEM_POOL_EXPAND_SIZE
205             #define LV_MEM_POOL_EXPAND_SIZE CONFIG_LV_MEM_POOL_EXPAND_SIZE
206         #else
207             #define LV_MEM_POOL_EXPAND_SIZE 0
208         #endif
209     #endif
210 
211     /** Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too. */
212     #ifndef LV_MEM_ADR
213         #ifdef CONFIG_LV_MEM_ADR
214             #define LV_MEM_ADR CONFIG_LV_MEM_ADR
215         #else
216             #define LV_MEM_ADR 0     /**< 0: unused*/
217         #endif
218     #endif
219     /* Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc */
220     #if LV_MEM_ADR == 0
221         #ifndef LV_MEM_POOL_INCLUDE
222             #ifdef CONFIG_LV_MEM_POOL_INCLUDE
223                 #define LV_MEM_POOL_INCLUDE CONFIG_LV_MEM_POOL_INCLUDE
224             #else
225                 #undef LV_MEM_POOL_INCLUDE
226             #endif
227         #endif
228         #ifndef LV_MEM_POOL_ALLOC
229             #ifdef CONFIG_LV_MEM_POOL_ALLOC
230                 #define LV_MEM_POOL_ALLOC CONFIG_LV_MEM_POOL_ALLOC
231             #else
232                 #undef LV_MEM_POOL_ALLOC
233             #endif
234         #endif
235     #endif
236 #endif  /*LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN*/
237 
238 /*====================
239    HAL SETTINGS
240  *====================*/
241 
242 /** Default display refresh, input device read and animation step period. */
243 #ifndef LV_DEF_REFR_PERIOD
244     #ifdef CONFIG_LV_DEF_REFR_PERIOD
245         #define LV_DEF_REFR_PERIOD CONFIG_LV_DEF_REFR_PERIOD
246     #else
247         #define LV_DEF_REFR_PERIOD  33      /**< [ms] */
248     #endif
249 #endif
250 
251 /** Default Dots Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
252  * (Not so important, you can adjust it to modify default sizes and spaces.) */
253 #ifndef LV_DPI_DEF
254     #ifdef CONFIG_LV_DPI_DEF
255         #define LV_DPI_DEF CONFIG_LV_DPI_DEF
256     #else
257         #define LV_DPI_DEF 130              /**< [px/inch] */
258     #endif
259 #endif
260 
261 /*=================
262  * OPERATING SYSTEM
263  *=================*/
264 /** Select operating system to use. Possible options:
265  * - LV_OS_NONE
266  * - LV_OS_PTHREAD
267  * - LV_OS_FREERTOS
268  * - LV_OS_CMSIS_RTOS2
269  * - LV_OS_RTTHREAD
270  * - LV_OS_WINDOWS
271  * - LV_OS_MQX
272  * - LV_OS_SDL2
273  * - LV_OS_CUSTOM */
274 #ifndef LV_USE_OS
275     #ifdef CONFIG_LV_USE_OS
276         #define LV_USE_OS CONFIG_LV_USE_OS
277     #else
278         #define LV_USE_OS   LV_OS_NONE
279     #endif
280 #endif
281 
282 #if LV_USE_OS == LV_OS_CUSTOM
283     #ifndef LV_OS_CUSTOM_INCLUDE
284         #ifdef CONFIG_LV_OS_CUSTOM_INCLUDE
285             #define LV_OS_CUSTOM_INCLUDE CONFIG_LV_OS_CUSTOM_INCLUDE
286         #else
287             #define LV_OS_CUSTOM_INCLUDE <stdint.h>
288         #endif
289     #endif
290 #endif
291 #if LV_USE_OS == LV_OS_FREERTOS
292 	/*
293 	 * Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM
294 	 * than unblocking a task using an intermediary object such as a binary semaphore.
295 	 * RTOS task notifications can only be used when there is only one task that can be the recipient of the event.
296 	 */
297 	#ifndef LV_USE_FREERTOS_TASK_NOTIFY
298 	    #ifdef LV_KCONFIG_PRESENT
299 	        #ifdef CONFIG_LV_USE_FREERTOS_TASK_NOTIFY
300 	            #define LV_USE_FREERTOS_TASK_NOTIFY CONFIG_LV_USE_FREERTOS_TASK_NOTIFY
301 	        #else
302 	            #define LV_USE_FREERTOS_TASK_NOTIFY 0
303 	        #endif
304 	    #else
305 	        #define LV_USE_FREERTOS_TASK_NOTIFY 1
306 	    #endif
307 	#endif
308 #endif
309 
310 /*========================
311  * RENDERING CONFIGURATION
312  *========================*/
313 
314 /** Align stride of all layers and images to this bytes */
315 #ifndef LV_DRAW_BUF_STRIDE_ALIGN
316     #ifdef LV_KCONFIG_PRESENT
317         #ifdef CONFIG_LV_DRAW_BUF_STRIDE_ALIGN
318             #define LV_DRAW_BUF_STRIDE_ALIGN CONFIG_LV_DRAW_BUF_STRIDE_ALIGN
319         #else
320             #define LV_DRAW_BUF_STRIDE_ALIGN 0
321         #endif
322     #else
323         #define LV_DRAW_BUF_STRIDE_ALIGN                1
324     #endif
325 #endif
326 
327 /** Align start address of draw_buf addresses to this bytes*/
328 #ifndef LV_DRAW_BUF_ALIGN
329     #ifdef CONFIG_LV_DRAW_BUF_ALIGN
330         #define LV_DRAW_BUF_ALIGN CONFIG_LV_DRAW_BUF_ALIGN
331     #else
332         #define LV_DRAW_BUF_ALIGN                       4
333     #endif
334 #endif
335 
336 /** Using matrix for transformations.
337  * Requirements:
338  * - `LV_USE_MATRIX = 1`.
339  * - Rendering engine needs to support 3x3 matrix transformations. */
340 #ifndef LV_DRAW_TRANSFORM_USE_MATRIX
341     #ifdef CONFIG_LV_DRAW_TRANSFORM_USE_MATRIX
342         #define LV_DRAW_TRANSFORM_USE_MATRIX CONFIG_LV_DRAW_TRANSFORM_USE_MATRIX
343     #else
344         #define LV_DRAW_TRANSFORM_USE_MATRIX            0
345     #endif
346 #endif
347 
348 /* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
349  * it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
350  * "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
351  * and can't be drawn in chunks. */
352 
353 /** The target buffer size for simple layer chunks. */
354 #ifndef LV_DRAW_LAYER_SIMPLE_BUF_SIZE
355     #ifdef CONFIG_LV_DRAW_LAYER_SIMPLE_BUF_SIZE
356         #define LV_DRAW_LAYER_SIMPLE_BUF_SIZE CONFIG_LV_DRAW_LAYER_SIMPLE_BUF_SIZE
357     #else
358         #define LV_DRAW_LAYER_SIMPLE_BUF_SIZE    (24 * 1024)    /**< [bytes]*/
359     #endif
360 #endif
361 
362 /* Limit the max allocated memory for simple and transformed layers.
363  * It should be at least `LV_DRAW_LAYER_SIMPLE_BUF_SIZE` sized but if transformed layers are also used
364  * it should be enough to store the largest widget too (width x height x 4 area).
365  * Set it to 0 to have no limit. */
366 #ifndef LV_DRAW_LAYER_MAX_MEMORY
367     #ifdef CONFIG_LV_DRAW_LAYER_MAX_MEMORY
368         #define LV_DRAW_LAYER_MAX_MEMORY CONFIG_LV_DRAW_LAYER_MAX_MEMORY
369     #else
370         #define LV_DRAW_LAYER_MAX_MEMORY 0  /**< No limit by default [bytes]*/
371     #endif
372 #endif
373 
374 /** Stack size of drawing thread.
375  * NOTE: If FreeType or ThorVG is enabled, it is recommended to set it to 32KB or more.
376  */
377 #ifndef LV_DRAW_THREAD_STACK_SIZE
378     #ifdef CONFIG_LV_DRAW_THREAD_STACK_SIZE
379         #define LV_DRAW_THREAD_STACK_SIZE CONFIG_LV_DRAW_THREAD_STACK_SIZE
380     #else
381         #define LV_DRAW_THREAD_STACK_SIZE    (8 * 1024)         /**< [bytes]*/
382     #endif
383 #endif
384 
385 #ifndef LV_USE_DRAW_SW
386     #ifdef LV_KCONFIG_PRESENT
387         #ifdef CONFIG_LV_USE_DRAW_SW
388             #define LV_USE_DRAW_SW CONFIG_LV_USE_DRAW_SW
389         #else
390             #define LV_USE_DRAW_SW 0
391         #endif
392     #else
393         #define LV_USE_DRAW_SW 1
394     #endif
395 #endif
396 #if LV_USE_DRAW_SW == 1
397     /*
398      * Selectively disable color format support in order to reduce code size.
399      * NOTE: some features use certain color formats internally, e.g.
400      * - gradients use RGB888
401      * - bitmaps with transparency may use ARGB8888
402      */
403     #ifndef LV_DRAW_SW_SUPPORT_RGB565
404         #ifdef LV_KCONFIG_PRESENT
405             #ifdef CONFIG_LV_DRAW_SW_SUPPORT_RGB565
406                 #define LV_DRAW_SW_SUPPORT_RGB565 CONFIG_LV_DRAW_SW_SUPPORT_RGB565
407             #else
408                 #define LV_DRAW_SW_SUPPORT_RGB565 0
409             #endif
410         #else
411             #define LV_DRAW_SW_SUPPORT_RGB565       1
412         #endif
413     #endif
414     #ifndef LV_DRAW_SW_SUPPORT_RGB565A8
415         #ifdef LV_KCONFIG_PRESENT
416             #ifdef CONFIG_LV_DRAW_SW_SUPPORT_RGB565A8
417                 #define LV_DRAW_SW_SUPPORT_RGB565A8 CONFIG_LV_DRAW_SW_SUPPORT_RGB565A8
418             #else
419                 #define LV_DRAW_SW_SUPPORT_RGB565A8 0
420             #endif
421         #else
422             #define LV_DRAW_SW_SUPPORT_RGB565A8     1
423         #endif
424     #endif
425     #ifndef LV_DRAW_SW_SUPPORT_RGB888
426         #ifdef LV_KCONFIG_PRESENT
427             #ifdef CONFIG_LV_DRAW_SW_SUPPORT_RGB888
428                 #define LV_DRAW_SW_SUPPORT_RGB888 CONFIG_LV_DRAW_SW_SUPPORT_RGB888
429             #else
430                 #define LV_DRAW_SW_SUPPORT_RGB888 0
431             #endif
432         #else
433             #define LV_DRAW_SW_SUPPORT_RGB888       1
434         #endif
435     #endif
436     #ifndef LV_DRAW_SW_SUPPORT_XRGB8888
437         #ifdef LV_KCONFIG_PRESENT
438             #ifdef CONFIG_LV_DRAW_SW_SUPPORT_XRGB8888
439                 #define LV_DRAW_SW_SUPPORT_XRGB8888 CONFIG_LV_DRAW_SW_SUPPORT_XRGB8888
440             #else
441                 #define LV_DRAW_SW_SUPPORT_XRGB8888 0
442             #endif
443         #else
444             #define LV_DRAW_SW_SUPPORT_XRGB8888     1
445         #endif
446     #endif
447     #ifndef LV_DRAW_SW_SUPPORT_ARGB8888
448         #ifdef LV_KCONFIG_PRESENT
449             #ifdef CONFIG_LV_DRAW_SW_SUPPORT_ARGB8888
450                 #define LV_DRAW_SW_SUPPORT_ARGB8888 CONFIG_LV_DRAW_SW_SUPPORT_ARGB8888
451             #else
452                 #define LV_DRAW_SW_SUPPORT_ARGB8888 0
453             #endif
454         #else
455             #define LV_DRAW_SW_SUPPORT_ARGB8888     1
456         #endif
457     #endif
458     #ifndef LV_DRAW_SW_SUPPORT_L8
459         #ifdef LV_KCONFIG_PRESENT
460             #ifdef CONFIG_LV_DRAW_SW_SUPPORT_L8
461                 #define LV_DRAW_SW_SUPPORT_L8 CONFIG_LV_DRAW_SW_SUPPORT_L8
462             #else
463                 #define LV_DRAW_SW_SUPPORT_L8 0
464             #endif
465         #else
466             #define LV_DRAW_SW_SUPPORT_L8           1
467         #endif
468     #endif
469     #ifndef LV_DRAW_SW_SUPPORT_AL88
470         #ifdef LV_KCONFIG_PRESENT
471             #ifdef CONFIG_LV_DRAW_SW_SUPPORT_AL88
472                 #define LV_DRAW_SW_SUPPORT_AL88 CONFIG_LV_DRAW_SW_SUPPORT_AL88
473             #else
474                 #define LV_DRAW_SW_SUPPORT_AL88 0
475             #endif
476         #else
477             #define LV_DRAW_SW_SUPPORT_AL88         1
478         #endif
479     #endif
480     #ifndef LV_DRAW_SW_SUPPORT_A8
481         #ifdef LV_KCONFIG_PRESENT
482             #ifdef CONFIG_LV_DRAW_SW_SUPPORT_A8
483                 #define LV_DRAW_SW_SUPPORT_A8 CONFIG_LV_DRAW_SW_SUPPORT_A8
484             #else
485                 #define LV_DRAW_SW_SUPPORT_A8 0
486             #endif
487         #else
488             #define LV_DRAW_SW_SUPPORT_A8           1
489         #endif
490     #endif
491     #ifndef LV_DRAW_SW_SUPPORT_I1
492         #ifdef LV_KCONFIG_PRESENT
493             #ifdef CONFIG_LV_DRAW_SW_SUPPORT_I1
494                 #define LV_DRAW_SW_SUPPORT_I1 CONFIG_LV_DRAW_SW_SUPPORT_I1
495             #else
496                 #define LV_DRAW_SW_SUPPORT_I1 0
497             #endif
498         #else
499             #define LV_DRAW_SW_SUPPORT_I1           1
500         #endif
501     #endif
502 
503     /* The threshold of the luminance to consider a pixel as
504      * active in indexed color format */
505     #ifndef LV_DRAW_SW_I1_LUM_THRESHOLD
506         #ifdef CONFIG_LV_DRAW_SW_I1_LUM_THRESHOLD
507             #define LV_DRAW_SW_I1_LUM_THRESHOLD CONFIG_LV_DRAW_SW_I1_LUM_THRESHOLD
508         #else
509             #define LV_DRAW_SW_I1_LUM_THRESHOLD 127
510         #endif
511     #endif
512 
513     /** Set number of draw units.
514      *  - > 1 requires operating system to be enabled in `LV_USE_OS`.
515      *  - > 1 means multiple threads will render the screen in parallel. */
516     #ifndef LV_DRAW_SW_DRAW_UNIT_CNT
517         #ifdef LV_KCONFIG_PRESENT
518             #ifdef CONFIG_LV_DRAW_SW_DRAW_UNIT_CNT
519                 #define LV_DRAW_SW_DRAW_UNIT_CNT CONFIG_LV_DRAW_SW_DRAW_UNIT_CNT
520             #else
521                 #define LV_DRAW_SW_DRAW_UNIT_CNT 0
522             #endif
523         #else
524             #define LV_DRAW_SW_DRAW_UNIT_CNT    1
525         #endif
526     #endif
527 
528     /** Use Arm-2D to accelerate software (sw) rendering. */
529     #ifndef LV_USE_DRAW_ARM2D_SYNC
530         #ifdef CONFIG_LV_USE_DRAW_ARM2D_SYNC
531             #define LV_USE_DRAW_ARM2D_SYNC CONFIG_LV_USE_DRAW_ARM2D_SYNC
532         #else
533             #define LV_USE_DRAW_ARM2D_SYNC      0
534         #endif
535     #endif
536 
537     /** Enable native helium assembly to be compiled. */
538     #ifndef LV_USE_NATIVE_HELIUM_ASM
539         #ifdef CONFIG_LV_USE_NATIVE_HELIUM_ASM
540             #define LV_USE_NATIVE_HELIUM_ASM CONFIG_LV_USE_NATIVE_HELIUM_ASM
541         #else
542             #define LV_USE_NATIVE_HELIUM_ASM    0
543         #endif
544     #endif
545 
546     /**
547      * - 0: Use a simple renderer capable of drawing only simple rectangles with gradient, images, text, and straight lines only.
548      * - 1: Use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too. */
549     #ifndef LV_DRAW_SW_COMPLEX
550         #ifdef LV_KCONFIG_PRESENT
551             #ifdef CONFIG_LV_DRAW_SW_COMPLEX
552                 #define LV_DRAW_SW_COMPLEX CONFIG_LV_DRAW_SW_COMPLEX
553             #else
554                 #define LV_DRAW_SW_COMPLEX 0
555             #endif
556         #else
557             #define LV_DRAW_SW_COMPLEX          1
558         #endif
559     #endif
560 
561     #if LV_DRAW_SW_COMPLEX == 1
562         /** Allow buffering some shadow calculation.
563          *  LV_DRAW_SW_SHADOW_CACHE_SIZE is the maximum shadow size to buffer, where shadow size is
564          *  `shadow_width + radius`.  Caching has LV_DRAW_SW_SHADOW_CACHE_SIZE^2 RAM cost. */
565         #ifndef LV_DRAW_SW_SHADOW_CACHE_SIZE
566             #ifdef CONFIG_LV_DRAW_SW_SHADOW_CACHE_SIZE
567                 #define LV_DRAW_SW_SHADOW_CACHE_SIZE CONFIG_LV_DRAW_SW_SHADOW_CACHE_SIZE
568             #else
569                 #define LV_DRAW_SW_SHADOW_CACHE_SIZE 0
570             #endif
571         #endif
572 
573         /** Set number of maximally-cached circle data.
574          *  The circumference of 1/4 circle are saved for anti-aliasing.
575          *  `radius * 4` bytes are used per circle (the most often used radiuses are saved).
576          *  - 0: disables caching */
577         #ifndef LV_DRAW_SW_CIRCLE_CACHE_SIZE
578             #ifdef CONFIG_LV_DRAW_SW_CIRCLE_CACHE_SIZE
579                 #define LV_DRAW_SW_CIRCLE_CACHE_SIZE CONFIG_LV_DRAW_SW_CIRCLE_CACHE_SIZE
580             #else
581                 #define LV_DRAW_SW_CIRCLE_CACHE_SIZE 4
582             #endif
583         #endif
584     #endif
585 
586     #ifndef LV_USE_DRAW_SW_ASM
587         #ifdef CONFIG_LV_USE_DRAW_SW_ASM
588             #define LV_USE_DRAW_SW_ASM CONFIG_LV_USE_DRAW_SW_ASM
589         #else
590             #define  LV_USE_DRAW_SW_ASM     LV_DRAW_SW_ASM_NONE
591         #endif
592     #endif
593 
594     #if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM
595         #ifndef LV_DRAW_SW_ASM_CUSTOM_INCLUDE
596             #ifdef CONFIG_LV_DRAW_SW_ASM_CUSTOM_INCLUDE
597                 #define LV_DRAW_SW_ASM_CUSTOM_INCLUDE CONFIG_LV_DRAW_SW_ASM_CUSTOM_INCLUDE
598             #else
599                 #define  LV_DRAW_SW_ASM_CUSTOM_INCLUDE ""
600             #endif
601         #endif
602     #endif
603 
604     /** Enable drawing complex gradients in software: linear at an angle, radial or conical */
605     #ifndef LV_USE_DRAW_SW_COMPLEX_GRADIENTS
606         #ifdef CONFIG_LV_USE_DRAW_SW_COMPLEX_GRADIENTS
607             #define LV_USE_DRAW_SW_COMPLEX_GRADIENTS CONFIG_LV_USE_DRAW_SW_COMPLEX_GRADIENTS
608         #else
609             #define LV_USE_DRAW_SW_COMPLEX_GRADIENTS    0
610         #endif
611     #endif
612 #endif
613 
614 /*Use TSi's aka (Think Silicon) NemaGFX */
615 #ifndef LV_USE_NEMA_GFX
616     #ifdef CONFIG_LV_USE_NEMA_GFX
617         #define LV_USE_NEMA_GFX CONFIG_LV_USE_NEMA_GFX
618     #else
619         #define LV_USE_NEMA_GFX 0
620     #endif
621 #endif
622 
623 #if LV_USE_NEMA_GFX
624     /** Select which NemaGFX HAL to use. Possible options:
625      * - LV_NEMA_HAL_CUSTOM
626      * - LV_NEMA_HAL_STM32 */
627     #ifndef LV_USE_NEMA_HAL
628         #ifdef CONFIG_LV_USE_NEMA_HAL
629             #define LV_USE_NEMA_HAL CONFIG_LV_USE_NEMA_HAL
630         #else
631             #define LV_USE_NEMA_HAL LV_NEMA_HAL_CUSTOM
632         #endif
633     #endif
634     #if LV_USE_NEMA_HAL == LV_NEMA_HAL_STM32
635         #ifndef LV_NEMA_STM32_HAL_INCLUDE
636             #ifdef CONFIG_LV_NEMA_STM32_HAL_INCLUDE
637                 #define LV_NEMA_STM32_HAL_INCLUDE CONFIG_LV_NEMA_STM32_HAL_INCLUDE
638             #else
639                 #define LV_NEMA_STM32_HAL_INCLUDE <stm32u5xx_hal.h>
640             #endif
641         #endif
642     #endif
643 
644     /*Enable Vector Graphics Operations. Available only if NemaVG library is present*/
645     #ifndef LV_USE_NEMA_VG
646         #ifdef CONFIG_LV_USE_NEMA_VG
647             #define LV_USE_NEMA_VG CONFIG_LV_USE_NEMA_VG
648         #else
649             #define LV_USE_NEMA_VG 0
650         #endif
651     #endif
652     #if LV_USE_NEMA_VG
653         /*Define application's resolution used for VG related buffer allocation */
654         #ifndef LV_NEMA_GFX_MAX_RESX
655             #ifdef CONFIG_LV_NEMA_GFX_MAX_RESX
656                 #define LV_NEMA_GFX_MAX_RESX CONFIG_LV_NEMA_GFX_MAX_RESX
657             #else
658                 #define LV_NEMA_GFX_MAX_RESX 800
659             #endif
660         #endif
661         #ifndef LV_NEMA_GFX_MAX_RESY
662             #ifdef CONFIG_LV_NEMA_GFX_MAX_RESY
663                 #define LV_NEMA_GFX_MAX_RESY CONFIG_LV_NEMA_GFX_MAX_RESY
664             #else
665                 #define LV_NEMA_GFX_MAX_RESY 600
666             #endif
667         #endif
668     #endif
669 #endif
670 
671 /** Use NXP's VG-Lite GPU on iMX RTxxx platforms. */
672 #ifndef LV_USE_DRAW_VGLITE
673     #ifdef CONFIG_LV_USE_DRAW_VGLITE
674         #define LV_USE_DRAW_VGLITE CONFIG_LV_USE_DRAW_VGLITE
675     #else
676         #define LV_USE_DRAW_VGLITE 0
677     #endif
678 #endif
679 
680 #if LV_USE_DRAW_VGLITE
681     /** Enable blit quality degradation workaround recommended for screen's dimension > 352 pixels. */
682     #ifndef LV_USE_VGLITE_BLIT_SPLIT
683         #ifdef CONFIG_LV_USE_VGLITE_BLIT_SPLIT
684             #define LV_USE_VGLITE_BLIT_SPLIT CONFIG_LV_USE_VGLITE_BLIT_SPLIT
685         #else
686             #define LV_USE_VGLITE_BLIT_SPLIT 0
687         #endif
688     #endif
689 
690     #if LV_USE_OS
691         /** Use additional draw thread for VG-Lite processing. */
692         #ifndef LV_USE_VGLITE_DRAW_THREAD
693             #ifdef LV_KCONFIG_PRESENT
694                 #ifdef CONFIG_LV_USE_VGLITE_DRAW_THREAD
695                     #define LV_USE_VGLITE_DRAW_THREAD CONFIG_LV_USE_VGLITE_DRAW_THREAD
696                 #else
697                     #define LV_USE_VGLITE_DRAW_THREAD 0
698                 #endif
699             #else
700                 #define LV_USE_VGLITE_DRAW_THREAD 1
701             #endif
702         #endif
703 
704         #if LV_USE_VGLITE_DRAW_THREAD
705             /** Enable VGLite draw async. Queue multiple tasks and flash them once to the GPU. */
706             #ifndef LV_USE_VGLITE_DRAW_ASYNC
707                 #ifdef LV_KCONFIG_PRESENT
708                     #ifdef CONFIG_LV_USE_VGLITE_DRAW_ASYNC
709                         #define LV_USE_VGLITE_DRAW_ASYNC CONFIG_LV_USE_VGLITE_DRAW_ASYNC
710                     #else
711                         #define LV_USE_VGLITE_DRAW_ASYNC 0
712                     #endif
713                 #else
714                     #define LV_USE_VGLITE_DRAW_ASYNC 1
715                 #endif
716             #endif
717         #endif
718     #endif
719 
720     /** Enable VGLite asserts. */
721     #ifndef LV_USE_VGLITE_ASSERT
722         #ifdef CONFIG_LV_USE_VGLITE_ASSERT
723             #define LV_USE_VGLITE_ASSERT CONFIG_LV_USE_VGLITE_ASSERT
724         #else
725             #define LV_USE_VGLITE_ASSERT 0
726         #endif
727     #endif
728 #endif
729 
730 /** Use NXP's PXP on iMX RTxxx platforms. */
731 #ifndef LV_USE_PXP
732     #ifdef CONFIG_LV_USE_PXP
733         #define LV_USE_PXP CONFIG_LV_USE_PXP
734     #else
735         #define LV_USE_PXP 0
736     #endif
737 #endif
738 
739 #if LV_USE_PXP
740     /** Use PXP for drawing.*/
741     #ifndef LV_USE_DRAW_PXP
742         #ifdef LV_KCONFIG_PRESENT
743             #ifdef CONFIG_LV_USE_DRAW_PXP
744                 #define LV_USE_DRAW_PXP CONFIG_LV_USE_DRAW_PXP
745             #else
746                 #define LV_USE_DRAW_PXP 0
747             #endif
748         #else
749             #define LV_USE_DRAW_PXP 1
750         #endif
751     #endif
752 
753     /** Use PXP to rotate display.*/
754     #ifndef LV_USE_ROTATE_PXP
755         #ifdef CONFIG_LV_USE_ROTATE_PXP
756             #define LV_USE_ROTATE_PXP CONFIG_LV_USE_ROTATE_PXP
757         #else
758             #define LV_USE_ROTATE_PXP 0
759         #endif
760     #endif
761 
762     #if LV_USE_DRAW_PXP && LV_USE_OS
763         /** Use additional draw thread for PXP processing.*/
764         #ifndef LV_USE_PXP_DRAW_THREAD
765             #ifdef LV_KCONFIG_PRESENT
766                 #ifdef CONFIG_LV_USE_PXP_DRAW_THREAD
767                     #define LV_USE_PXP_DRAW_THREAD CONFIG_LV_USE_PXP_DRAW_THREAD
768                 #else
769                     #define LV_USE_PXP_DRAW_THREAD 0
770                 #endif
771             #else
772                 #define LV_USE_PXP_DRAW_THREAD 1
773             #endif
774         #endif
775     #endif
776 
777     /** Enable PXP asserts. */
778     #ifndef LV_USE_PXP_ASSERT
779         #ifdef CONFIG_LV_USE_PXP_ASSERT
780             #define LV_USE_PXP_ASSERT CONFIG_LV_USE_PXP_ASSERT
781         #else
782             #define LV_USE_PXP_ASSERT 0
783         #endif
784     #endif
785 #endif
786 
787 /** Use Renesas Dave2D on RA  platforms. */
788 #ifndef LV_USE_DRAW_DAVE2D
789     #ifdef CONFIG_LV_USE_DRAW_DAVE2D
790         #define LV_USE_DRAW_DAVE2D CONFIG_LV_USE_DRAW_DAVE2D
791     #else
792         #define LV_USE_DRAW_DAVE2D 0
793     #endif
794 #endif
795 
796 /** Draw using cached SDL textures*/
797 #ifndef LV_USE_DRAW_SDL
798     #ifdef CONFIG_LV_USE_DRAW_SDL
799         #define LV_USE_DRAW_SDL CONFIG_LV_USE_DRAW_SDL
800     #else
801         #define LV_USE_DRAW_SDL 0
802     #endif
803 #endif
804 
805 /** Use VG-Lite GPU. */
806 #ifndef LV_USE_DRAW_VG_LITE
807     #ifdef CONFIG_LV_USE_DRAW_VG_LITE
808         #define LV_USE_DRAW_VG_LITE CONFIG_LV_USE_DRAW_VG_LITE
809     #else
810         #define LV_USE_DRAW_VG_LITE 0
811     #endif
812 #endif
813 
814 #if LV_USE_DRAW_VG_LITE
815     /** Enable VG-Lite custom external 'gpu_init()' function */
816     #ifndef LV_VG_LITE_USE_GPU_INIT
817         #ifdef CONFIG_LV_VG_LITE_USE_GPU_INIT
818             #define LV_VG_LITE_USE_GPU_INIT CONFIG_LV_VG_LITE_USE_GPU_INIT
819         #else
820             #define LV_VG_LITE_USE_GPU_INIT 0
821         #endif
822     #endif
823 
824     /** Enable VG-Lite assert. */
825     #ifndef LV_VG_LITE_USE_ASSERT
826         #ifdef CONFIG_LV_VG_LITE_USE_ASSERT
827             #define LV_VG_LITE_USE_ASSERT CONFIG_LV_VG_LITE_USE_ASSERT
828         #else
829             #define LV_VG_LITE_USE_ASSERT 0
830         #endif
831     #endif
832 
833     /** VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */
834     #ifndef LV_VG_LITE_FLUSH_MAX_COUNT
835         #ifdef CONFIG_LV_VG_LITE_FLUSH_MAX_COUNT
836             #define LV_VG_LITE_FLUSH_MAX_COUNT CONFIG_LV_VG_LITE_FLUSH_MAX_COUNT
837         #else
838             #define LV_VG_LITE_FLUSH_MAX_COUNT 8
839         #endif
840     #endif
841 
842     /** Enable border to simulate shadow.
843      *  NOTE: which usually improves performance,
844      *  but does not guarantee the same rendering quality as the software. */
845     #ifndef LV_VG_LITE_USE_BOX_SHADOW
846         #ifdef CONFIG_LV_VG_LITE_USE_BOX_SHADOW
847             #define LV_VG_LITE_USE_BOX_SHADOW CONFIG_LV_VG_LITE_USE_BOX_SHADOW
848         #else
849             #define LV_VG_LITE_USE_BOX_SHADOW 0
850         #endif
851     #endif
852 
853     /** VG-Lite gradient maximum cache number.
854      *  @note  The memory usage of a single gradient image is 4K bytes. */
855     #ifndef LV_VG_LITE_GRAD_CACHE_CNT
856         #ifdef CONFIG_LV_VG_LITE_GRAD_CACHE_CNT
857             #define LV_VG_LITE_GRAD_CACHE_CNT CONFIG_LV_VG_LITE_GRAD_CACHE_CNT
858         #else
859             #define LV_VG_LITE_GRAD_CACHE_CNT 32
860         #endif
861     #endif
862 
863     /** VG-Lite stroke maximum cache number. */
864     #ifndef LV_VG_LITE_STROKE_CACHE_CNT
865         #ifdef CONFIG_LV_VG_LITE_STROKE_CACHE_CNT
866             #define LV_VG_LITE_STROKE_CACHE_CNT CONFIG_LV_VG_LITE_STROKE_CACHE_CNT
867         #else
868             #define LV_VG_LITE_STROKE_CACHE_CNT 32
869         #endif
870     #endif
871 #endif
872 
873 /** Accelerate blends, fills, etc. with STM32 DMA2D */
874 #ifndef LV_USE_DRAW_DMA2D
875     #ifdef CONFIG_LV_USE_DRAW_DMA2D
876         #define LV_USE_DRAW_DMA2D CONFIG_LV_USE_DRAW_DMA2D
877     #else
878         #define LV_USE_DRAW_DMA2D 0
879     #endif
880 #endif
881 
882 #if LV_USE_DRAW_DMA2D
883     #ifndef LV_DRAW_DMA2D_HAL_INCLUDE
884         #ifdef CONFIG_LV_DRAW_DMA2D_HAL_INCLUDE
885             #define LV_DRAW_DMA2D_HAL_INCLUDE CONFIG_LV_DRAW_DMA2D_HAL_INCLUDE
886         #else
887             #define LV_DRAW_DMA2D_HAL_INCLUDE "stm32h7xx_hal.h"
888         #endif
889     #endif
890 
891     /* if enabled, the user is required to call `lv_draw_dma2d_transfer_complete_interrupt_handler`
892      * upon receiving the DMA2D global interrupt
893      */
894     #ifndef LV_USE_DRAW_DMA2D_INTERRUPT
895         #ifdef CONFIG_LV_USE_DRAW_DMA2D_INTERRUPT
896             #define LV_USE_DRAW_DMA2D_INTERRUPT CONFIG_LV_USE_DRAW_DMA2D_INTERRUPT
897         #else
898             #define LV_USE_DRAW_DMA2D_INTERRUPT 0
899         #endif
900     #endif
901 #endif
902 
903 /** Draw using cached OpenGLES textures */
904 #ifndef LV_USE_DRAW_OPENGLES
905     #ifdef CONFIG_LV_USE_DRAW_OPENGLES
906         #define LV_USE_DRAW_OPENGLES CONFIG_LV_USE_DRAW_OPENGLES
907     #else
908         #define LV_USE_DRAW_OPENGLES 0
909     #endif
910 #endif
911 
912 /*=======================
913  * FEATURE CONFIGURATION
914  *=======================*/
915 
916 /*-------------
917  * Logging
918  *-----------*/
919 
920 /** Enable log module */
921 #ifndef LV_USE_LOG
922     #ifdef CONFIG_LV_USE_LOG
923         #define LV_USE_LOG CONFIG_LV_USE_LOG
924     #else
925         #define LV_USE_LOG 0
926     #endif
927 #endif
928 #if LV_USE_LOG
929     /** Set value to one of the following levels of logging detail:
930      *  - LV_LOG_LEVEL_TRACE    Log detailed information.
931      *  - LV_LOG_LEVEL_INFO     Log important events.
932      *  - LV_LOG_LEVEL_WARN     Log if something unwanted happened but didn't cause a problem.
933      *  - LV_LOG_LEVEL_ERROR    Log only critical issues, when system may fail.
934      *  - LV_LOG_LEVEL_USER     Log only custom log messages added by the user.
935      *  - LV_LOG_LEVEL_NONE     Do not log anything. */
936     #ifndef LV_LOG_LEVEL
937         #ifdef CONFIG_LV_LOG_LEVEL
938             #define LV_LOG_LEVEL CONFIG_LV_LOG_LEVEL
939         #else
940             #define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
941         #endif
942     #endif
943 
944     /** - 1: Print log with 'printf';
945      *  - 0: User needs to register a callback with `lv_log_register_print_cb()`. */
946     #ifndef LV_LOG_PRINTF
947         #ifdef CONFIG_LV_LOG_PRINTF
948             #define LV_LOG_PRINTF CONFIG_LV_LOG_PRINTF
949         #else
950             #define LV_LOG_PRINTF 0
951         #endif
952     #endif
953 
954     /** Set callback to print logs.
955      *  E.g `my_print`. The prototype should be `void my_print(lv_log_level_t level, const char * buf)`.
956      *  Can be overwritten by `lv_log_register_print_cb`. */
957     //#define LV_LOG_PRINT_CB
958 
959     /** - 1: Enable printing timestamp;
960      *  - 0: Disable printing timestamp. */
961     #ifndef LV_LOG_USE_TIMESTAMP
962         #ifdef LV_KCONFIG_PRESENT
963             #ifdef CONFIG_LV_LOG_USE_TIMESTAMP
964                 #define LV_LOG_USE_TIMESTAMP CONFIG_LV_LOG_USE_TIMESTAMP
965             #else
966                 #define LV_LOG_USE_TIMESTAMP 0
967             #endif
968         #else
969             #define LV_LOG_USE_TIMESTAMP 1
970         #endif
971     #endif
972 
973     /** - 1: Print file and line number of the log;
974      *  - 0: Do not print file and line number of the log. */
975     #ifndef LV_LOG_USE_FILE_LINE
976         #ifdef LV_KCONFIG_PRESENT
977             #ifdef CONFIG_LV_LOG_USE_FILE_LINE
978                 #define LV_LOG_USE_FILE_LINE CONFIG_LV_LOG_USE_FILE_LINE
979             #else
980                 #define LV_LOG_USE_FILE_LINE 0
981             #endif
982         #else
983             #define LV_LOG_USE_FILE_LINE 1
984         #endif
985     #endif
986 
987     /* Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs. */
988     #ifndef LV_LOG_TRACE_MEM
989         #ifdef LV_KCONFIG_PRESENT
990             #ifdef CONFIG_LV_LOG_TRACE_MEM
991                 #define LV_LOG_TRACE_MEM CONFIG_LV_LOG_TRACE_MEM
992             #else
993                 #define LV_LOG_TRACE_MEM 0
994             #endif
995         #else
996             #define LV_LOG_TRACE_MEM        1   /**< Enable/disable trace logs in memory operations. */
997         #endif
998     #endif
999     #ifndef LV_LOG_TRACE_TIMER
1000         #ifdef LV_KCONFIG_PRESENT
1001             #ifdef CONFIG_LV_LOG_TRACE_TIMER
1002                 #define LV_LOG_TRACE_TIMER CONFIG_LV_LOG_TRACE_TIMER
1003             #else
1004                 #define LV_LOG_TRACE_TIMER 0
1005             #endif
1006         #else
1007             #define LV_LOG_TRACE_TIMER      1   /**< Enable/disable trace logs in timer operations. */
1008         #endif
1009     #endif
1010     #ifndef LV_LOG_TRACE_INDEV
1011         #ifdef LV_KCONFIG_PRESENT
1012             #ifdef CONFIG_LV_LOG_TRACE_INDEV
1013                 #define LV_LOG_TRACE_INDEV CONFIG_LV_LOG_TRACE_INDEV
1014             #else
1015                 #define LV_LOG_TRACE_INDEV 0
1016             #endif
1017         #else
1018             #define LV_LOG_TRACE_INDEV      1   /**< Enable/disable trace logs in input device operations. */
1019         #endif
1020     #endif
1021     #ifndef LV_LOG_TRACE_DISP_REFR
1022         #ifdef LV_KCONFIG_PRESENT
1023             #ifdef CONFIG_LV_LOG_TRACE_DISP_REFR
1024                 #define LV_LOG_TRACE_DISP_REFR CONFIG_LV_LOG_TRACE_DISP_REFR
1025             #else
1026                 #define LV_LOG_TRACE_DISP_REFR 0
1027             #endif
1028         #else
1029             #define LV_LOG_TRACE_DISP_REFR  1   /**< Enable/disable trace logs in display re-draw operations. */
1030         #endif
1031     #endif
1032     #ifndef LV_LOG_TRACE_EVENT
1033         #ifdef LV_KCONFIG_PRESENT
1034             #ifdef CONFIG_LV_LOG_TRACE_EVENT
1035                 #define LV_LOG_TRACE_EVENT CONFIG_LV_LOG_TRACE_EVENT
1036             #else
1037                 #define LV_LOG_TRACE_EVENT 0
1038             #endif
1039         #else
1040             #define LV_LOG_TRACE_EVENT      1   /**< Enable/disable trace logs in event dispatch logic. */
1041         #endif
1042     #endif
1043     #ifndef LV_LOG_TRACE_OBJ_CREATE
1044         #ifdef LV_KCONFIG_PRESENT
1045             #ifdef CONFIG_LV_LOG_TRACE_OBJ_CREATE
1046                 #define LV_LOG_TRACE_OBJ_CREATE CONFIG_LV_LOG_TRACE_OBJ_CREATE
1047             #else
1048                 #define LV_LOG_TRACE_OBJ_CREATE 0
1049             #endif
1050         #else
1051             #define LV_LOG_TRACE_OBJ_CREATE 1   /**< Enable/disable trace logs in object creation (core `obj` creation plus every widget). */
1052         #endif
1053     #endif
1054     #ifndef LV_LOG_TRACE_LAYOUT
1055         #ifdef LV_KCONFIG_PRESENT
1056             #ifdef CONFIG_LV_LOG_TRACE_LAYOUT
1057                 #define LV_LOG_TRACE_LAYOUT CONFIG_LV_LOG_TRACE_LAYOUT
1058             #else
1059                 #define LV_LOG_TRACE_LAYOUT 0
1060             #endif
1061         #else
1062             #define LV_LOG_TRACE_LAYOUT     1   /**< Enable/disable trace logs in flex- and grid-layout operations. */
1063         #endif
1064     #endif
1065     #ifndef LV_LOG_TRACE_ANIM
1066         #ifdef LV_KCONFIG_PRESENT
1067             #ifdef CONFIG_LV_LOG_TRACE_ANIM
1068                 #define LV_LOG_TRACE_ANIM CONFIG_LV_LOG_TRACE_ANIM
1069             #else
1070                 #define LV_LOG_TRACE_ANIM 0
1071             #endif
1072         #else
1073             #define LV_LOG_TRACE_ANIM       1   /**< Enable/disable trace logs in animation logic. */
1074         #endif
1075     #endif
1076     #ifndef LV_LOG_TRACE_CACHE
1077         #ifdef LV_KCONFIG_PRESENT
1078             #ifdef CONFIG_LV_LOG_TRACE_CACHE
1079                 #define LV_LOG_TRACE_CACHE CONFIG_LV_LOG_TRACE_CACHE
1080             #else
1081                 #define LV_LOG_TRACE_CACHE 0
1082             #endif
1083         #else
1084             #define LV_LOG_TRACE_CACHE      1   /**< Enable/disable trace logs in cache operations. */
1085         #endif
1086     #endif
1087 #endif  /*LV_USE_LOG*/
1088 
1089 /*-------------
1090  * Asserts
1091  *-----------*/
1092 
1093 /* Enable assertion failures if an operation fails or invalid data is found.
1094  * If LV_USE_LOG is enabled, an error message will be printed on failure. */
1095 #ifndef LV_USE_ASSERT_NULL
1096     #ifdef LV_KCONFIG_PRESENT
1097         #ifdef CONFIG_LV_USE_ASSERT_NULL
1098             #define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL
1099         #else
1100             #define LV_USE_ASSERT_NULL 0
1101         #endif
1102     #else
1103         #define LV_USE_ASSERT_NULL          1   /**< Check if the parameter is NULL. (Very fast, recommended) */
1104     #endif
1105 #endif
1106 #ifndef LV_USE_ASSERT_MALLOC
1107     #ifdef LV_KCONFIG_PRESENT
1108         #ifdef CONFIG_LV_USE_ASSERT_MALLOC
1109             #define LV_USE_ASSERT_MALLOC CONFIG_LV_USE_ASSERT_MALLOC
1110         #else
1111             #define LV_USE_ASSERT_MALLOC 0
1112         #endif
1113     #else
1114         #define LV_USE_ASSERT_MALLOC        1   /**< Checks is the memory is successfully allocated or no. (Very fast, recommended) */
1115     #endif
1116 #endif
1117 #ifndef LV_USE_ASSERT_STYLE
1118     #ifdef CONFIG_LV_USE_ASSERT_STYLE
1119         #define LV_USE_ASSERT_STYLE CONFIG_LV_USE_ASSERT_STYLE
1120     #else
1121         #define LV_USE_ASSERT_STYLE         0   /**< Check if the styles are properly initialized. (Very fast, recommended) */
1122     #endif
1123 #endif
1124 #ifndef LV_USE_ASSERT_MEM_INTEGRITY
1125     #ifdef CONFIG_LV_USE_ASSERT_MEM_INTEGRITY
1126         #define LV_USE_ASSERT_MEM_INTEGRITY CONFIG_LV_USE_ASSERT_MEM_INTEGRITY
1127     #else
1128         #define LV_USE_ASSERT_MEM_INTEGRITY 0   /**< Check the integrity of `lv_mem` after critical operations. (Slow) */
1129     #endif
1130 #endif
1131 #ifndef LV_USE_ASSERT_OBJ
1132     #ifdef CONFIG_LV_USE_ASSERT_OBJ
1133         #define LV_USE_ASSERT_OBJ CONFIG_LV_USE_ASSERT_OBJ
1134     #else
1135         #define LV_USE_ASSERT_OBJ           0   /**< Check the object's type and existence (e.g. not deleted). (Slow) */
1136     #endif
1137 #endif
1138 
1139 /** Add a custom handler when assert happens e.g. to restart MCU. */
1140 #ifndef LV_ASSERT_HANDLER_INCLUDE
1141     #ifdef CONFIG_LV_ASSERT_HANDLER_INCLUDE
1142         #define LV_ASSERT_HANDLER_INCLUDE CONFIG_LV_ASSERT_HANDLER_INCLUDE
1143     #else
1144         #define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
1145     #endif
1146 #endif
1147 #ifndef LV_ASSERT_HANDLER
1148     #ifdef CONFIG_LV_ASSERT_HANDLER
1149         #define LV_ASSERT_HANDLER CONFIG_LV_ASSERT_HANDLER
1150     #else
1151         #define LV_ASSERT_HANDLER while(1);     /**< Halt by default */
1152     #endif
1153 #endif
1154 
1155 /*-------------
1156  * Debug
1157  *-----------*/
1158 
1159 /** 1: Draw random colored rectangles over the redrawn areas. */
1160 #ifndef LV_USE_REFR_DEBUG
1161     #ifdef CONFIG_LV_USE_REFR_DEBUG
1162         #define LV_USE_REFR_DEBUG CONFIG_LV_USE_REFR_DEBUG
1163     #else
1164         #define LV_USE_REFR_DEBUG 0
1165     #endif
1166 #endif
1167 
1168 /** 1: Draw a red overlay for ARGB layers and a green overlay for RGB layers*/
1169 #ifndef LV_USE_LAYER_DEBUG
1170     #ifdef CONFIG_LV_USE_LAYER_DEBUG
1171         #define LV_USE_LAYER_DEBUG CONFIG_LV_USE_LAYER_DEBUG
1172     #else
1173         #define LV_USE_LAYER_DEBUG 0
1174     #endif
1175 #endif
1176 
1177 /** 1: Adds the following behaviors for debugging:
1178  *  - Draw overlays with different colors for each draw_unit's tasks.
1179  *  - Draw index number of draw unit on white background.
1180  *  - For layers, draws index number of draw unit on black background. */
1181 #ifndef LV_USE_PARALLEL_DRAW_DEBUG
1182     #ifdef CONFIG_LV_USE_PARALLEL_DRAW_DEBUG
1183         #define LV_USE_PARALLEL_DRAW_DEBUG CONFIG_LV_USE_PARALLEL_DRAW_DEBUG
1184     #else
1185         #define LV_USE_PARALLEL_DRAW_DEBUG 0
1186     #endif
1187 #endif
1188 
1189 /*-------------
1190  * Others
1191  *-----------*/
1192 
1193 #ifndef LV_ENABLE_GLOBAL_CUSTOM
1194     #ifdef CONFIG_LV_ENABLE_GLOBAL_CUSTOM
1195         #define LV_ENABLE_GLOBAL_CUSTOM CONFIG_LV_ENABLE_GLOBAL_CUSTOM
1196     #else
1197         #define LV_ENABLE_GLOBAL_CUSTOM 0
1198     #endif
1199 #endif
1200 #if LV_ENABLE_GLOBAL_CUSTOM
1201     /** Header to include for custom 'lv_global' function" */
1202     #ifndef LV_GLOBAL_CUSTOM_INCLUDE
1203         #ifdef CONFIG_LV_GLOBAL_CUSTOM_INCLUDE
1204             #define LV_GLOBAL_CUSTOM_INCLUDE CONFIG_LV_GLOBAL_CUSTOM_INCLUDE
1205         #else
1206             #define LV_GLOBAL_CUSTOM_INCLUDE <stdint.h>
1207         #endif
1208     #endif
1209 #endif
1210 
1211 /** Default cache size in bytes.
1212  *  Used by image decoders such as `lv_lodepng` to keep the decoded image in memory.
1213  *  If size is not set to 0, the decoder will fail to decode when the cache is full.
1214  *  If size is 0, the cache function is not enabled and the decoded memory will be
1215  *  released immediately after use. */
1216 #ifndef LV_CACHE_DEF_SIZE
1217     #ifdef CONFIG_LV_CACHE_DEF_SIZE
1218         #define LV_CACHE_DEF_SIZE CONFIG_LV_CACHE_DEF_SIZE
1219     #else
1220         #define LV_CACHE_DEF_SIZE       0
1221     #endif
1222 #endif
1223 
1224 /** Default number of image header cache entries. The cache is used to store the headers of images
1225  *  The main logic is like `LV_CACHE_DEF_SIZE` but for image headers. */
1226 #ifndef LV_IMAGE_HEADER_CACHE_DEF_CNT
1227     #ifdef CONFIG_LV_IMAGE_HEADER_CACHE_DEF_CNT
1228         #define LV_IMAGE_HEADER_CACHE_DEF_CNT CONFIG_LV_IMAGE_HEADER_CACHE_DEF_CNT
1229     #else
1230         #define LV_IMAGE_HEADER_CACHE_DEF_CNT 0
1231     #endif
1232 #endif
1233 
1234 /** Number of stops allowed per gradient. Increase this to allow more stops.
1235  *  This adds (sizeof(lv_color_t) + 1) bytes per additional stop. */
1236 #ifndef LV_GRADIENT_MAX_STOPS
1237     #ifdef CONFIG_LV_GRADIENT_MAX_STOPS
1238         #define LV_GRADIENT_MAX_STOPS CONFIG_LV_GRADIENT_MAX_STOPS
1239     #else
1240         #define LV_GRADIENT_MAX_STOPS   2
1241     #endif
1242 #endif
1243 
1244 /** Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently.
1245  *  - 0:   round down,
1246  *  - 64:  round up from x.75,
1247  *  - 128: round up from half,
1248  *  - 192: round up from x.25,
1249  *  - 254: round up */
1250 #ifndef LV_COLOR_MIX_ROUND_OFS
1251     #ifdef CONFIG_LV_COLOR_MIX_ROUND_OFS
1252         #define LV_COLOR_MIX_ROUND_OFS CONFIG_LV_COLOR_MIX_ROUND_OFS
1253     #else
1254         #define LV_COLOR_MIX_ROUND_OFS  0
1255     #endif
1256 #endif
1257 
1258 /** Add 2 x 32-bit variables to each `lv_obj_t` to speed up getting style properties */
1259 #ifndef LV_OBJ_STYLE_CACHE
1260     #ifdef CONFIG_LV_OBJ_STYLE_CACHE
1261         #define LV_OBJ_STYLE_CACHE CONFIG_LV_OBJ_STYLE_CACHE
1262     #else
1263         #define LV_OBJ_STYLE_CACHE      0
1264     #endif
1265 #endif
1266 
1267 /** Add `id` field to `lv_obj_t` */
1268 #ifndef LV_USE_OBJ_ID
1269     #ifdef CONFIG_LV_USE_OBJ_ID
1270         #define LV_USE_OBJ_ID CONFIG_LV_USE_OBJ_ID
1271     #else
1272         #define LV_USE_OBJ_ID           0
1273     #endif
1274 #endif
1275 
1276 /** Automatically assign an ID when obj is created */
1277 #ifndef LV_OBJ_ID_AUTO_ASSIGN
1278     #ifdef CONFIG_LV_OBJ_ID_AUTO_ASSIGN
1279         #define LV_OBJ_ID_AUTO_ASSIGN CONFIG_LV_OBJ_ID_AUTO_ASSIGN
1280     #else
1281         #define LV_OBJ_ID_AUTO_ASSIGN   LV_USE_OBJ_ID
1282     #endif
1283 #endif
1284 
1285 /** Use builtin obj ID handler functions:
1286 * - lv_obj_assign_id:       Called when a widget is created. Use a separate counter for each widget class as an ID.
1287 * - lv_obj_id_compare:      Compare the ID to decide if it matches with a requested value.
1288 * - lv_obj_stringify_id:    Return string-ified identifier, e.g. "button3".
1289 * - lv_obj_free_id:         Does nothing, as there is no memory allocation for the ID.
1290 * When disabled these functions needs to be implemented by the user.*/
1291 #ifndef LV_USE_OBJ_ID_BUILTIN
1292     #ifdef LV_KCONFIG_PRESENT
1293         #ifdef CONFIG_LV_USE_OBJ_ID_BUILTIN
1294             #define LV_USE_OBJ_ID_BUILTIN CONFIG_LV_USE_OBJ_ID_BUILTIN
1295         #else
1296             #define LV_USE_OBJ_ID_BUILTIN 0
1297         #endif
1298     #else
1299         #define LV_USE_OBJ_ID_BUILTIN   1
1300     #endif
1301 #endif
1302 
1303 /** Use obj property set/get API. */
1304 #ifndef LV_USE_OBJ_PROPERTY
1305     #ifdef CONFIG_LV_USE_OBJ_PROPERTY
1306         #define LV_USE_OBJ_PROPERTY CONFIG_LV_USE_OBJ_PROPERTY
1307     #else
1308         #define LV_USE_OBJ_PROPERTY 0
1309     #endif
1310 #endif
1311 
1312 /** Enable property name support. */
1313 #ifndef LV_USE_OBJ_PROPERTY_NAME
1314     #ifdef LV_KCONFIG_PRESENT
1315         #ifdef CONFIG_LV_USE_OBJ_PROPERTY_NAME
1316             #define LV_USE_OBJ_PROPERTY_NAME CONFIG_LV_USE_OBJ_PROPERTY_NAME
1317         #else
1318             #define LV_USE_OBJ_PROPERTY_NAME 0
1319         #endif
1320     #else
1321         #define LV_USE_OBJ_PROPERTY_NAME 1
1322     #endif
1323 #endif
1324 
1325 /* Use VG-Lite Simulator.
1326  * - Requires: LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL */
1327 #ifndef LV_USE_VG_LITE_THORVG
1328     #ifdef CONFIG_LV_USE_VG_LITE_THORVG
1329         #define LV_USE_VG_LITE_THORVG CONFIG_LV_USE_VG_LITE_THORVG
1330     #else
1331         #define LV_USE_VG_LITE_THORVG  0
1332     #endif
1333 #endif
1334 
1335 #if LV_USE_VG_LITE_THORVG
1336     /** Enable LVGL's blend mode support */
1337     #ifndef LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
1338         #ifdef CONFIG_LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
1339             #define LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT CONFIG_LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
1340         #else
1341             #define LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT 0
1342         #endif
1343     #endif
1344 
1345     /** Enable YUV color format support */
1346     #ifndef LV_VG_LITE_THORVG_YUV_SUPPORT
1347         #ifdef CONFIG_LV_VG_LITE_THORVG_YUV_SUPPORT
1348             #define LV_VG_LITE_THORVG_YUV_SUPPORT CONFIG_LV_VG_LITE_THORVG_YUV_SUPPORT
1349         #else
1350             #define LV_VG_LITE_THORVG_YUV_SUPPORT 0
1351         #endif
1352     #endif
1353 
1354     /** Enable Linear gradient extension support */
1355     #ifndef LV_VG_LITE_THORVG_LINEAR_GRADIENT_EXT_SUPPORT
1356         #ifdef CONFIG_LV_VG_LITE_THORVG_LINEAR_GRADIENT_EXT_SUPPORT
1357             #define LV_VG_LITE_THORVG_LINEAR_GRADIENT_EXT_SUPPORT CONFIG_LV_VG_LITE_THORVG_LINEAR_GRADIENT_EXT_SUPPORT
1358         #else
1359             #define LV_VG_LITE_THORVG_LINEAR_GRADIENT_EXT_SUPPORT 0
1360         #endif
1361     #endif
1362 
1363     /** Enable alignment on 16 pixels */
1364     #ifndef LV_VG_LITE_THORVG_16PIXELS_ALIGN
1365         #ifdef LV_KCONFIG_PRESENT
1366             #ifdef CONFIG_LV_VG_LITE_THORVG_16PIXELS_ALIGN
1367                 #define LV_VG_LITE_THORVG_16PIXELS_ALIGN CONFIG_LV_VG_LITE_THORVG_16PIXELS_ALIGN
1368             #else
1369                 #define LV_VG_LITE_THORVG_16PIXELS_ALIGN 0
1370             #endif
1371         #else
1372             #define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1
1373         #endif
1374     #endif
1375 
1376     /** Buffer address alignment */
1377     #ifndef LV_VG_LITE_THORVG_BUF_ADDR_ALIGN
1378         #ifdef CONFIG_LV_VG_LITE_THORVG_BUF_ADDR_ALIGN
1379             #define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN CONFIG_LV_VG_LITE_THORVG_BUF_ADDR_ALIGN
1380         #else
1381             #define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN 64
1382         #endif
1383     #endif
1384 
1385     /** Enable multi-thread render */
1386     #ifndef LV_VG_LITE_THORVG_THREAD_RENDER
1387         #ifdef CONFIG_LV_VG_LITE_THORVG_THREAD_RENDER
1388             #define LV_VG_LITE_THORVG_THREAD_RENDER CONFIG_LV_VG_LITE_THORVG_THREAD_RENDER
1389         #else
1390             #define LV_VG_LITE_THORVG_THREAD_RENDER 0
1391         #endif
1392     #endif
1393 #endif
1394 
1395 /* Enable the multi-touch gesture recognition feature */
1396 /* Gesture recognition requires the use of floats */
1397 #ifndef LV_USE_GESTURE_RECOGNITION
1398     #ifdef CONFIG_LV_USE_GESTURE_RECOGNITION
1399         #define LV_USE_GESTURE_RECOGNITION CONFIG_LV_USE_GESTURE_RECOGNITION
1400     #else
1401         #define LV_USE_GESTURE_RECOGNITION 0
1402     #endif
1403 #endif
1404 
1405 /*=====================
1406  *  COMPILER SETTINGS
1407  *====================*/
1408 
1409 /** For big endian systems set to 1 */
1410 #ifndef LV_BIG_ENDIAN_SYSTEM
1411     #ifdef CONFIG_LV_BIG_ENDIAN_SYSTEM
1412         #define LV_BIG_ENDIAN_SYSTEM CONFIG_LV_BIG_ENDIAN_SYSTEM
1413     #else
1414         #define LV_BIG_ENDIAN_SYSTEM 0
1415     #endif
1416 #endif
1417 
1418 /** Define a custom attribute for `lv_tick_inc` function */
1419 #ifndef LV_ATTRIBUTE_TICK_INC
1420     #ifdef CONFIG_LV_ATTRIBUTE_TICK_INC
1421         #define LV_ATTRIBUTE_TICK_INC CONFIG_LV_ATTRIBUTE_TICK_INC
1422     #else
1423         #define LV_ATTRIBUTE_TICK_INC
1424     #endif
1425 #endif
1426 
1427 /** Define a custom attribute for `lv_timer_handler` function */
1428 #ifndef LV_ATTRIBUTE_TIMER_HANDLER
1429     #ifdef CONFIG_LV_ATTRIBUTE_TIMER_HANDLER
1430         #define LV_ATTRIBUTE_TIMER_HANDLER CONFIG_LV_ATTRIBUTE_TIMER_HANDLER
1431     #else
1432         #define LV_ATTRIBUTE_TIMER_HANDLER
1433     #endif
1434 #endif
1435 
1436 /** Define a custom attribute for `lv_display_flush_ready` function */
1437 #ifndef LV_ATTRIBUTE_FLUSH_READY
1438     #ifdef CONFIG_LV_ATTRIBUTE_FLUSH_READY
1439         #define LV_ATTRIBUTE_FLUSH_READY CONFIG_LV_ATTRIBUTE_FLUSH_READY
1440     #else
1441         #define LV_ATTRIBUTE_FLUSH_READY
1442     #endif
1443 #endif
1444 
1445 /** Align VG_LITE buffers on this number of bytes.
1446  *  @note  vglite_src_buf_aligned() uses this value to validate alignment of passed buffer pointers. */
1447 #ifndef LV_ATTRIBUTE_MEM_ALIGN_SIZE
1448     #ifdef LV_KCONFIG_PRESENT
1449         #ifdef CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE
1450             #define LV_ATTRIBUTE_MEM_ALIGN_SIZE CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE
1451         #else
1452             #define LV_ATTRIBUTE_MEM_ALIGN_SIZE 0
1453         #endif
1454     #else
1455         #define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
1456     #endif
1457 #endif
1458 
1459 /** Will be added where memory needs to be aligned (with -Os data might not be aligned to boundary by default).
1460  *  E.g. __attribute__((aligned(4)))*/
1461 #ifndef LV_ATTRIBUTE_MEM_ALIGN
1462     #ifdef CONFIG_LV_ATTRIBUTE_MEM_ALIGN
1463         #define LV_ATTRIBUTE_MEM_ALIGN CONFIG_LV_ATTRIBUTE_MEM_ALIGN
1464     #else
1465         #define LV_ATTRIBUTE_MEM_ALIGN
1466     #endif
1467 #endif
1468 
1469 /** Attribute to mark large constant arrays, for example for font bitmaps */
1470 #ifndef LV_ATTRIBUTE_LARGE_CONST
1471     #ifdef CONFIG_LV_ATTRIBUTE_LARGE_CONST
1472         #define LV_ATTRIBUTE_LARGE_CONST CONFIG_LV_ATTRIBUTE_LARGE_CONST
1473     #else
1474         #define LV_ATTRIBUTE_LARGE_CONST
1475     #endif
1476 #endif
1477 
1478 /** Compiler prefix for a large array declaration in RAM */
1479 #ifndef LV_ATTRIBUTE_LARGE_RAM_ARRAY
1480     #ifdef CONFIG_LV_ATTRIBUTE_LARGE_RAM_ARRAY
1481         #define LV_ATTRIBUTE_LARGE_RAM_ARRAY CONFIG_LV_ATTRIBUTE_LARGE_RAM_ARRAY
1482     #else
1483         #define LV_ATTRIBUTE_LARGE_RAM_ARRAY
1484     #endif
1485 #endif
1486 
1487 /** Place performance critical functions into a faster memory (e.g RAM) */
1488 #ifndef LV_ATTRIBUTE_FAST_MEM
1489     #ifdef CONFIG_LV_ATTRIBUTE_FAST_MEM
1490         #define LV_ATTRIBUTE_FAST_MEM CONFIG_LV_ATTRIBUTE_FAST_MEM
1491     #else
1492         #define LV_ATTRIBUTE_FAST_MEM
1493     #endif
1494 #endif
1495 
1496 /** Export integer constant to binding. This macro is used with constants in the form of LV_<CONST> that
1497  *  should also appear on LVGL binding API such as MicroPython. */
1498 #ifndef LV_EXPORT_CONST_INT
1499     #ifdef CONFIG_LV_EXPORT_CONST_INT
1500         #define LV_EXPORT_CONST_INT CONFIG_LV_EXPORT_CONST_INT
1501     #else
1502         #define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning  /**< The default value just prevents GCC warning */
1503     #endif
1504 #endif
1505 
1506 /** Prefix all global extern data with this */
1507 #ifndef LV_ATTRIBUTE_EXTERN_DATA
1508     #ifdef CONFIG_LV_ATTRIBUTE_EXTERN_DATA
1509         #define LV_ATTRIBUTE_EXTERN_DATA CONFIG_LV_ATTRIBUTE_EXTERN_DATA
1510     #else
1511         #define LV_ATTRIBUTE_EXTERN_DATA
1512     #endif
1513 #endif
1514 
1515 /** Use `float` as `lv_value_precise_t` */
1516 #ifndef LV_USE_FLOAT
1517     #ifdef CONFIG_LV_USE_FLOAT
1518         #define LV_USE_FLOAT CONFIG_LV_USE_FLOAT
1519     #else
1520         #define LV_USE_FLOAT            0
1521     #endif
1522 #endif
1523 
1524 /** Enable matrix support
1525  *  - Requires `LV_USE_FLOAT = 1` */
1526 #ifndef LV_USE_MATRIX
1527     #ifdef CONFIG_LV_USE_MATRIX
1528         #define LV_USE_MATRIX CONFIG_LV_USE_MATRIX
1529     #else
1530         #define LV_USE_MATRIX           0
1531     #endif
1532 #endif
1533 
1534 /** Include `lvgl_private.h` in `lvgl.h` to access internal data and functions by default */
1535 #ifndef LV_USE_PRIVATE_API
1536     #ifdef CONFIG_LV_USE_PRIVATE_API
1537         #define LV_USE_PRIVATE_API CONFIG_LV_USE_PRIVATE_API
1538     #else
1539         #define LV_USE_PRIVATE_API		0
1540     #endif
1541 #endif
1542 
1543 /*==================
1544  *   FONT USAGE
1545  *===================*/
1546 
1547 /* Montserrat fonts with ASCII range and some symbols using bpp = 4
1548  * https://fonts.google.com/specimen/Montserrat */
1549 #ifndef LV_FONT_MONTSERRAT_8
1550     #ifdef CONFIG_LV_FONT_MONTSERRAT_8
1551         #define LV_FONT_MONTSERRAT_8 CONFIG_LV_FONT_MONTSERRAT_8
1552     #else
1553         #define LV_FONT_MONTSERRAT_8  0
1554     #endif
1555 #endif
1556 #ifndef LV_FONT_MONTSERRAT_10
1557     #ifdef CONFIG_LV_FONT_MONTSERRAT_10
1558         #define LV_FONT_MONTSERRAT_10 CONFIG_LV_FONT_MONTSERRAT_10
1559     #else
1560         #define LV_FONT_MONTSERRAT_10 0
1561     #endif
1562 #endif
1563 #ifndef LV_FONT_MONTSERRAT_12
1564     #ifdef CONFIG_LV_FONT_MONTSERRAT_12
1565         #define LV_FONT_MONTSERRAT_12 CONFIG_LV_FONT_MONTSERRAT_12
1566     #else
1567         #define LV_FONT_MONTSERRAT_12 0
1568     #endif
1569 #endif
1570 #ifndef LV_FONT_MONTSERRAT_14
1571     #ifdef LV_KCONFIG_PRESENT
1572         #ifdef CONFIG_LV_FONT_MONTSERRAT_14
1573             #define LV_FONT_MONTSERRAT_14 CONFIG_LV_FONT_MONTSERRAT_14
1574         #else
1575             #define LV_FONT_MONTSERRAT_14 0
1576         #endif
1577     #else
1578         #define LV_FONT_MONTSERRAT_14 1
1579     #endif
1580 #endif
1581 #ifndef LV_FONT_MONTSERRAT_16
1582     #ifdef CONFIG_LV_FONT_MONTSERRAT_16
1583         #define LV_FONT_MONTSERRAT_16 CONFIG_LV_FONT_MONTSERRAT_16
1584     #else
1585         #define LV_FONT_MONTSERRAT_16 0
1586     #endif
1587 #endif
1588 #ifndef LV_FONT_MONTSERRAT_18
1589     #ifdef CONFIG_LV_FONT_MONTSERRAT_18
1590         #define LV_FONT_MONTSERRAT_18 CONFIG_LV_FONT_MONTSERRAT_18
1591     #else
1592         #define LV_FONT_MONTSERRAT_18 0
1593     #endif
1594 #endif
1595 #ifndef LV_FONT_MONTSERRAT_20
1596     #ifdef CONFIG_LV_FONT_MONTSERRAT_20
1597         #define LV_FONT_MONTSERRAT_20 CONFIG_LV_FONT_MONTSERRAT_20
1598     #else
1599         #define LV_FONT_MONTSERRAT_20 0
1600     #endif
1601 #endif
1602 #ifndef LV_FONT_MONTSERRAT_22
1603     #ifdef CONFIG_LV_FONT_MONTSERRAT_22
1604         #define LV_FONT_MONTSERRAT_22 CONFIG_LV_FONT_MONTSERRAT_22
1605     #else
1606         #define LV_FONT_MONTSERRAT_22 0
1607     #endif
1608 #endif
1609 #ifndef LV_FONT_MONTSERRAT_24
1610     #ifdef CONFIG_LV_FONT_MONTSERRAT_24
1611         #define LV_FONT_MONTSERRAT_24 CONFIG_LV_FONT_MONTSERRAT_24
1612     #else
1613         #define LV_FONT_MONTSERRAT_24 0
1614     #endif
1615 #endif
1616 #ifndef LV_FONT_MONTSERRAT_26
1617     #ifdef CONFIG_LV_FONT_MONTSERRAT_26
1618         #define LV_FONT_MONTSERRAT_26 CONFIG_LV_FONT_MONTSERRAT_26
1619     #else
1620         #define LV_FONT_MONTSERRAT_26 0
1621     #endif
1622 #endif
1623 #ifndef LV_FONT_MONTSERRAT_28
1624     #ifdef CONFIG_LV_FONT_MONTSERRAT_28
1625         #define LV_FONT_MONTSERRAT_28 CONFIG_LV_FONT_MONTSERRAT_28
1626     #else
1627         #define LV_FONT_MONTSERRAT_28 0
1628     #endif
1629 #endif
1630 #ifndef LV_FONT_MONTSERRAT_30
1631     #ifdef CONFIG_LV_FONT_MONTSERRAT_30
1632         #define LV_FONT_MONTSERRAT_30 CONFIG_LV_FONT_MONTSERRAT_30
1633     #else
1634         #define LV_FONT_MONTSERRAT_30 0
1635     #endif
1636 #endif
1637 #ifndef LV_FONT_MONTSERRAT_32
1638     #ifdef CONFIG_LV_FONT_MONTSERRAT_32
1639         #define LV_FONT_MONTSERRAT_32 CONFIG_LV_FONT_MONTSERRAT_32
1640     #else
1641         #define LV_FONT_MONTSERRAT_32 0
1642     #endif
1643 #endif
1644 #ifndef LV_FONT_MONTSERRAT_34
1645     #ifdef CONFIG_LV_FONT_MONTSERRAT_34
1646         #define LV_FONT_MONTSERRAT_34 CONFIG_LV_FONT_MONTSERRAT_34
1647     #else
1648         #define LV_FONT_MONTSERRAT_34 0
1649     #endif
1650 #endif
1651 #ifndef LV_FONT_MONTSERRAT_36
1652     #ifdef CONFIG_LV_FONT_MONTSERRAT_36
1653         #define LV_FONT_MONTSERRAT_36 CONFIG_LV_FONT_MONTSERRAT_36
1654     #else
1655         #define LV_FONT_MONTSERRAT_36 0
1656     #endif
1657 #endif
1658 #ifndef LV_FONT_MONTSERRAT_38
1659     #ifdef CONFIG_LV_FONT_MONTSERRAT_38
1660         #define LV_FONT_MONTSERRAT_38 CONFIG_LV_FONT_MONTSERRAT_38
1661     #else
1662         #define LV_FONT_MONTSERRAT_38 0
1663     #endif
1664 #endif
1665 #ifndef LV_FONT_MONTSERRAT_40
1666     #ifdef CONFIG_LV_FONT_MONTSERRAT_40
1667         #define LV_FONT_MONTSERRAT_40 CONFIG_LV_FONT_MONTSERRAT_40
1668     #else
1669         #define LV_FONT_MONTSERRAT_40 0
1670     #endif
1671 #endif
1672 #ifndef LV_FONT_MONTSERRAT_42
1673     #ifdef CONFIG_LV_FONT_MONTSERRAT_42
1674         #define LV_FONT_MONTSERRAT_42 CONFIG_LV_FONT_MONTSERRAT_42
1675     #else
1676         #define LV_FONT_MONTSERRAT_42 0
1677     #endif
1678 #endif
1679 #ifndef LV_FONT_MONTSERRAT_44
1680     #ifdef CONFIG_LV_FONT_MONTSERRAT_44
1681         #define LV_FONT_MONTSERRAT_44 CONFIG_LV_FONT_MONTSERRAT_44
1682     #else
1683         #define LV_FONT_MONTSERRAT_44 0
1684     #endif
1685 #endif
1686 #ifndef LV_FONT_MONTSERRAT_46
1687     #ifdef CONFIG_LV_FONT_MONTSERRAT_46
1688         #define LV_FONT_MONTSERRAT_46 CONFIG_LV_FONT_MONTSERRAT_46
1689     #else
1690         #define LV_FONT_MONTSERRAT_46 0
1691     #endif
1692 #endif
1693 #ifndef LV_FONT_MONTSERRAT_48
1694     #ifdef CONFIG_LV_FONT_MONTSERRAT_48
1695         #define LV_FONT_MONTSERRAT_48 CONFIG_LV_FONT_MONTSERRAT_48
1696     #else
1697         #define LV_FONT_MONTSERRAT_48 0
1698     #endif
1699 #endif
1700 
1701 /* Demonstrate special features */
1702 #ifndef LV_FONT_MONTSERRAT_28_COMPRESSED
1703     #ifdef CONFIG_LV_FONT_MONTSERRAT_28_COMPRESSED
1704         #define LV_FONT_MONTSERRAT_28_COMPRESSED CONFIG_LV_FONT_MONTSERRAT_28_COMPRESSED
1705     #else
1706         #define LV_FONT_MONTSERRAT_28_COMPRESSED 0  /**< bpp = 3 */
1707     #endif
1708 #endif
1709 #ifndef LV_FONT_DEJAVU_16_PERSIAN_HEBREW
1710     #ifdef CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW
1711         #define LV_FONT_DEJAVU_16_PERSIAN_HEBREW CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW
1712     #else
1713         #define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0  /**< Hebrew, Arabic, Persian letters and all their forms */
1714     #endif
1715 #endif
1716 #ifndef LV_FONT_SIMSUN_14_CJK
1717     #ifdef CONFIG_LV_FONT_SIMSUN_14_CJK
1718         #define LV_FONT_SIMSUN_14_CJK CONFIG_LV_FONT_SIMSUN_14_CJK
1719     #else
1720         #define LV_FONT_SIMSUN_14_CJK            0  /**< 1000 most common CJK radicals */
1721     #endif
1722 #endif
1723 #ifndef LV_FONT_SIMSUN_16_CJK
1724     #ifdef CONFIG_LV_FONT_SIMSUN_16_CJK
1725         #define LV_FONT_SIMSUN_16_CJK CONFIG_LV_FONT_SIMSUN_16_CJK
1726     #else
1727         #define LV_FONT_SIMSUN_16_CJK            0  /**< 1000 most common CJK radicals */
1728     #endif
1729 #endif
1730 
1731 /** Pixel perfect monospaced fonts */
1732 #ifndef LV_FONT_UNSCII_8
1733     #ifdef CONFIG_LV_FONT_UNSCII_8
1734         #define LV_FONT_UNSCII_8 CONFIG_LV_FONT_UNSCII_8
1735     #else
1736         #define LV_FONT_UNSCII_8  0
1737     #endif
1738 #endif
1739 #ifndef LV_FONT_UNSCII_16
1740     #ifdef CONFIG_LV_FONT_UNSCII_16
1741         #define LV_FONT_UNSCII_16 CONFIG_LV_FONT_UNSCII_16
1742     #else
1743         #define LV_FONT_UNSCII_16 0
1744     #endif
1745 #endif
1746 
1747 /** Optionally declare custom fonts here.
1748  *
1749  *  You can use any of these fonts as the default font too and they will be available
1750  *  globally.  Example:
1751  *
1752  *  @code
1753  *  #define LV_FONT_CUSTOM_DECLARE   LV_FONT_DECLARE(my_font_1) LV_FONT_DECLARE(my_font_2)
1754  *  @endcode
1755  */
1756 #ifndef LV_FONT_CUSTOM_DECLARE
1757     #ifdef CONFIG_LV_FONT_CUSTOM_DECLARE
1758         #define LV_FONT_CUSTOM_DECLARE CONFIG_LV_FONT_CUSTOM_DECLARE
1759     #else
1760         #define LV_FONT_CUSTOM_DECLARE
1761     #endif
1762 #endif
1763 
1764 /** Always set a default font */
1765 #ifndef LV_FONT_DEFAULT
1766     #ifdef CONFIG_LV_FONT_DEFAULT
1767         #define LV_FONT_DEFAULT CONFIG_LV_FONT_DEFAULT
1768     #else
1769         #define LV_FONT_DEFAULT &lv_font_montserrat_14
1770     #endif
1771 #endif
1772 
1773 /** Enable handling large font and/or fonts with a lot of characters.
1774  *  The limit depends on the font size, font face and bpp.
1775  *  A compiler error will be triggered if a font needs it. */
1776 #ifndef LV_FONT_FMT_TXT_LARGE
1777     #ifdef CONFIG_LV_FONT_FMT_TXT_LARGE
1778         #define LV_FONT_FMT_TXT_LARGE CONFIG_LV_FONT_FMT_TXT_LARGE
1779     #else
1780         #define LV_FONT_FMT_TXT_LARGE 0
1781     #endif
1782 #endif
1783 
1784 /** Enables/disables support for compressed fonts. */
1785 #ifndef LV_USE_FONT_COMPRESSED
1786     #ifdef CONFIG_LV_USE_FONT_COMPRESSED
1787         #define LV_USE_FONT_COMPRESSED CONFIG_LV_USE_FONT_COMPRESSED
1788     #else
1789         #define LV_USE_FONT_COMPRESSED 0
1790     #endif
1791 #endif
1792 
1793 /** Enable drawing placeholders when glyph dsc is not found. */
1794 #ifndef LV_USE_FONT_PLACEHOLDER
1795     #ifdef LV_KCONFIG_PRESENT
1796         #ifdef CONFIG_LV_USE_FONT_PLACEHOLDER
1797             #define LV_USE_FONT_PLACEHOLDER CONFIG_LV_USE_FONT_PLACEHOLDER
1798         #else
1799             #define LV_USE_FONT_PLACEHOLDER 0
1800         #endif
1801     #else
1802         #define LV_USE_FONT_PLACEHOLDER 1
1803     #endif
1804 #endif
1805 
1806 /*=================
1807  *  TEXT SETTINGS
1808  *=================*/
1809 
1810 /**
1811  * Select a character encoding for strings.
1812  * Your IDE or editor should have the same character encoding.
1813  * - LV_TXT_ENC_UTF8
1814  * - LV_TXT_ENC_ASCII
1815  */
1816 #ifndef LV_TXT_ENC
1817     #ifdef CONFIG_LV_TXT_ENC
1818         #define LV_TXT_ENC CONFIG_LV_TXT_ENC
1819     #else
1820         #define LV_TXT_ENC LV_TXT_ENC_UTF8
1821     #endif
1822 #endif
1823 
1824 /** While rendering text strings, break (wrap) text on these chars. */
1825 #ifndef LV_TXT_BREAK_CHARS
1826     #ifdef CONFIG_LV_TXT_BREAK_CHARS
1827         #define LV_TXT_BREAK_CHARS CONFIG_LV_TXT_BREAK_CHARS
1828     #else
1829         #define LV_TXT_BREAK_CHARS " ,.;:-_)]}"
1830     #endif
1831 #endif
1832 
1833 /** If a word is at least this long, will break wherever "prettiest".
1834  *  To disable, set to a value <= 0. */
1835 #ifndef LV_TXT_LINE_BREAK_LONG_LEN
1836     #ifdef CONFIG_LV_TXT_LINE_BREAK_LONG_LEN
1837         #define LV_TXT_LINE_BREAK_LONG_LEN CONFIG_LV_TXT_LINE_BREAK_LONG_LEN
1838     #else
1839         #define LV_TXT_LINE_BREAK_LONG_LEN 0
1840     #endif
1841 #endif
1842 
1843 /** Minimum number of characters in a long word to put on a line before a break.
1844  *  Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
1845 #ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN
1846     #ifdef CONFIG_LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN
1847         #define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN CONFIG_LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN
1848     #else
1849         #define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
1850     #endif
1851 #endif
1852 
1853 /** Minimum number of characters in a long word to put on a line after a break.
1854  *  Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
1855 #ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN
1856     #ifdef CONFIG_LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN
1857         #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN CONFIG_LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN
1858     #else
1859         #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
1860     #endif
1861 #endif
1862 
1863 /** Support bidirectional text. Allows mixing Left-to-Right and Right-to-Left text.
1864  *  The direction will be processed according to the Unicode Bidirectional Algorithm:
1865  *  https://www.w3.org/International/articles/inline-bidi-markup/uba-basics */
1866 #ifndef LV_USE_BIDI
1867     #ifdef CONFIG_LV_USE_BIDI
1868         #define LV_USE_BIDI CONFIG_LV_USE_BIDI
1869     #else
1870         #define LV_USE_BIDI 0
1871     #endif
1872 #endif
1873 #if LV_USE_BIDI
1874     /*Set the default direction. Supported values:
1875     *`LV_BASE_DIR_LTR` Left-to-Right
1876     *`LV_BASE_DIR_RTL` Right-to-Left
1877     *`LV_BASE_DIR_AUTO` detect text base direction*/
1878     #ifndef LV_BIDI_BASE_DIR_DEF
1879         #ifdef CONFIG_LV_BIDI_BASE_DIR_DEF
1880             #define LV_BIDI_BASE_DIR_DEF CONFIG_LV_BIDI_BASE_DIR_DEF
1881         #else
1882             #define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
1883         #endif
1884     #endif
1885 #endif
1886 
1887 /** Enable Arabic/Persian processing
1888  *  In these languages characters should be replaced with another form based on their position in the text */
1889 #ifndef LV_USE_ARABIC_PERSIAN_CHARS
1890     #ifdef CONFIG_LV_USE_ARABIC_PERSIAN_CHARS
1891         #define LV_USE_ARABIC_PERSIAN_CHARS CONFIG_LV_USE_ARABIC_PERSIAN_CHARS
1892     #else
1893         #define LV_USE_ARABIC_PERSIAN_CHARS 0
1894     #endif
1895 #endif
1896 
1897 /*The control character to use for signaling text recoloring*/
1898 #ifndef LV_TXT_COLOR_CMD
1899     #ifdef CONFIG_LV_TXT_COLOR_CMD
1900         #define LV_TXT_COLOR_CMD CONFIG_LV_TXT_COLOR_CMD
1901     #else
1902         #define LV_TXT_COLOR_CMD "#"
1903     #endif
1904 #endif
1905 
1906 /*==================
1907  * WIDGETS
1908  *================*/
1909 /* Documentation for widgets can be found here: https://docs.lvgl.io/latest/en/html/widgets/index.html . */
1910 
1911 /** 1: Causes these widgets to be given default values at creation time.
1912  *  - lv_buttonmatrix_t:  Get default maps:  {"Btn1", "Btn2", "Btn3", "\n", "Btn4", "Btn5", ""}, else map not set.
1913  *  - lv_checkbox_t    :  String label set to "Check box", else set to empty string.
1914  *  - lv_dropdown_t    :  Options set to "Option 1", "Option 2", "Option 3", else no values are set.
1915  *  - lv_roller_t      :  Options set to "Option 1", "Option 2", "Option 3", "Option 4", "Option 5", else no values are set.
1916  *  - lv_label_t       :  Text set to "Text", else empty string.
1917  * */
1918 #ifndef LV_WIDGETS_HAS_DEFAULT_VALUE
1919     #ifdef LV_KCONFIG_PRESENT
1920         #ifdef CONFIG_LV_WIDGETS_HAS_DEFAULT_VALUE
1921             #define LV_WIDGETS_HAS_DEFAULT_VALUE CONFIG_LV_WIDGETS_HAS_DEFAULT_VALUE
1922         #else
1923             #define LV_WIDGETS_HAS_DEFAULT_VALUE 0
1924         #endif
1925     #else
1926         #define LV_WIDGETS_HAS_DEFAULT_VALUE  1
1927     #endif
1928 #endif
1929 
1930 #ifndef LV_USE_ANIMIMG
1931     #ifdef LV_KCONFIG_PRESENT
1932         #ifdef CONFIG_LV_USE_ANIMIMG
1933             #define LV_USE_ANIMIMG CONFIG_LV_USE_ANIMIMG
1934         #else
1935             #define LV_USE_ANIMIMG 0
1936         #endif
1937     #else
1938         #define LV_USE_ANIMIMG    1
1939     #endif
1940 #endif
1941 
1942 #ifndef LV_USE_ARC
1943     #ifdef LV_KCONFIG_PRESENT
1944         #ifdef CONFIG_LV_USE_ARC
1945             #define LV_USE_ARC CONFIG_LV_USE_ARC
1946         #else
1947             #define LV_USE_ARC 0
1948         #endif
1949     #else
1950         #define LV_USE_ARC        1
1951     #endif
1952 #endif
1953 
1954 #ifndef LV_USE_BAR
1955     #ifdef LV_KCONFIG_PRESENT
1956         #ifdef CONFIG_LV_USE_BAR
1957             #define LV_USE_BAR CONFIG_LV_USE_BAR
1958         #else
1959             #define LV_USE_BAR 0
1960         #endif
1961     #else
1962         #define LV_USE_BAR        1
1963     #endif
1964 #endif
1965 
1966 #ifndef LV_USE_BUTTON
1967     #ifdef LV_KCONFIG_PRESENT
1968         #ifdef CONFIG_LV_USE_BUTTON
1969             #define LV_USE_BUTTON CONFIG_LV_USE_BUTTON
1970         #else
1971             #define LV_USE_BUTTON 0
1972         #endif
1973     #else
1974         #define LV_USE_BUTTON        1
1975     #endif
1976 #endif
1977 
1978 #ifndef LV_USE_BUTTONMATRIX
1979     #ifdef LV_KCONFIG_PRESENT
1980         #ifdef CONFIG_LV_USE_BUTTONMATRIX
1981             #define LV_USE_BUTTONMATRIX CONFIG_LV_USE_BUTTONMATRIX
1982         #else
1983             #define LV_USE_BUTTONMATRIX 0
1984         #endif
1985     #else
1986         #define LV_USE_BUTTONMATRIX  1
1987     #endif
1988 #endif
1989 
1990 #ifndef LV_USE_CALENDAR
1991     #ifdef LV_KCONFIG_PRESENT
1992         #ifdef CONFIG_LV_USE_CALENDAR
1993             #define LV_USE_CALENDAR CONFIG_LV_USE_CALENDAR
1994         #else
1995             #define LV_USE_CALENDAR 0
1996         #endif
1997     #else
1998         #define LV_USE_CALENDAR   1
1999     #endif
2000 #endif
2001 #if LV_USE_CALENDAR
2002     #ifndef LV_CALENDAR_WEEK_STARTS_MONDAY
2003         #ifdef CONFIG_LV_CALENDAR_WEEK_STARTS_MONDAY
2004             #define LV_CALENDAR_WEEK_STARTS_MONDAY CONFIG_LV_CALENDAR_WEEK_STARTS_MONDAY
2005         #else
2006             #define LV_CALENDAR_WEEK_STARTS_MONDAY 0
2007         #endif
2008     #endif
2009     #if LV_CALENDAR_WEEK_STARTS_MONDAY
2010         #ifndef LV_CALENDAR_DEFAULT_DAY_NAMES
2011             #ifdef CONFIG_LV_CALENDAR_DEFAULT_DAY_NAMES
2012                 #define LV_CALENDAR_DEFAULT_DAY_NAMES CONFIG_LV_CALENDAR_DEFAULT_DAY_NAMES
2013             #else
2014                 #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"}
2015             #endif
2016         #endif
2017     #else
2018         #ifndef LV_CALENDAR_DEFAULT_DAY_NAMES
2019             #ifdef CONFIG_LV_CALENDAR_DEFAULT_DAY_NAMES
2020                 #define LV_CALENDAR_DEFAULT_DAY_NAMES CONFIG_LV_CALENDAR_DEFAULT_DAY_NAMES
2021             #else
2022                 #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}
2023             #endif
2024         #endif
2025     #endif
2026 
2027     #ifndef LV_CALENDAR_DEFAULT_MONTH_NAMES
2028         #ifdef CONFIG_LV_CALENDAR_DEFAULT_MONTH_NAMES
2029             #define LV_CALENDAR_DEFAULT_MONTH_NAMES CONFIG_LV_CALENDAR_DEFAULT_MONTH_NAMES
2030         #else
2031             #define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March",  "April", "May",  "June", "July", "August", "September", "October", "November", "December"}
2032         #endif
2033     #endif
2034     #ifndef LV_USE_CALENDAR_HEADER_ARROW
2035         #ifdef LV_KCONFIG_PRESENT
2036             #ifdef CONFIG_LV_USE_CALENDAR_HEADER_ARROW
2037                 #define LV_USE_CALENDAR_HEADER_ARROW CONFIG_LV_USE_CALENDAR_HEADER_ARROW
2038             #else
2039                 #define LV_USE_CALENDAR_HEADER_ARROW 0
2040             #endif
2041         #else
2042             #define LV_USE_CALENDAR_HEADER_ARROW 1
2043         #endif
2044     #endif
2045     #ifndef LV_USE_CALENDAR_HEADER_DROPDOWN
2046         #ifdef LV_KCONFIG_PRESENT
2047             #ifdef CONFIG_LV_USE_CALENDAR_HEADER_DROPDOWN
2048                 #define LV_USE_CALENDAR_HEADER_DROPDOWN CONFIG_LV_USE_CALENDAR_HEADER_DROPDOWN
2049             #else
2050                 #define LV_USE_CALENDAR_HEADER_DROPDOWN 0
2051             #endif
2052         #else
2053             #define LV_USE_CALENDAR_HEADER_DROPDOWN 1
2054         #endif
2055     #endif
2056     #ifndef LV_USE_CALENDAR_CHINESE
2057         #ifdef CONFIG_LV_USE_CALENDAR_CHINESE
2058             #define LV_USE_CALENDAR_CHINESE CONFIG_LV_USE_CALENDAR_CHINESE
2059         #else
2060             #define LV_USE_CALENDAR_CHINESE 0
2061         #endif
2062     #endif
2063 #endif  /*LV_USE_CALENDAR*/
2064 
2065 #ifndef LV_USE_CANVAS
2066     #ifdef LV_KCONFIG_PRESENT
2067         #ifdef CONFIG_LV_USE_CANVAS
2068             #define LV_USE_CANVAS CONFIG_LV_USE_CANVAS
2069         #else
2070             #define LV_USE_CANVAS 0
2071         #endif
2072     #else
2073         #define LV_USE_CANVAS     1
2074     #endif
2075 #endif
2076 
2077 #ifndef LV_USE_CHART
2078     #ifdef LV_KCONFIG_PRESENT
2079         #ifdef CONFIG_LV_USE_CHART
2080             #define LV_USE_CHART CONFIG_LV_USE_CHART
2081         #else
2082             #define LV_USE_CHART 0
2083         #endif
2084     #else
2085         #define LV_USE_CHART      1
2086     #endif
2087 #endif
2088 
2089 #ifndef LV_USE_CHECKBOX
2090     #ifdef LV_KCONFIG_PRESENT
2091         #ifdef CONFIG_LV_USE_CHECKBOX
2092             #define LV_USE_CHECKBOX CONFIG_LV_USE_CHECKBOX
2093         #else
2094             #define LV_USE_CHECKBOX 0
2095         #endif
2096     #else
2097         #define LV_USE_CHECKBOX   1
2098     #endif
2099 #endif
2100 
2101 #ifndef LV_USE_DROPDOWN
2102     #ifdef LV_KCONFIG_PRESENT
2103         #ifdef CONFIG_LV_USE_DROPDOWN
2104             #define LV_USE_DROPDOWN CONFIG_LV_USE_DROPDOWN
2105         #else
2106             #define LV_USE_DROPDOWN 0
2107         #endif
2108     #else
2109         #define LV_USE_DROPDOWN   1   /**< Requires: lv_label */
2110     #endif
2111 #endif
2112 
2113 #ifndef LV_USE_IMAGE
2114     #ifdef LV_KCONFIG_PRESENT
2115         #ifdef CONFIG_LV_USE_IMAGE
2116             #define LV_USE_IMAGE CONFIG_LV_USE_IMAGE
2117         #else
2118             #define LV_USE_IMAGE 0
2119         #endif
2120     #else
2121         #define LV_USE_IMAGE      1   /**< Requires: lv_label */
2122     #endif
2123 #endif
2124 
2125 #ifndef LV_USE_IMAGEBUTTON
2126     #ifdef LV_KCONFIG_PRESENT
2127         #ifdef CONFIG_LV_USE_IMAGEBUTTON
2128             #define LV_USE_IMAGEBUTTON CONFIG_LV_USE_IMAGEBUTTON
2129         #else
2130             #define LV_USE_IMAGEBUTTON 0
2131         #endif
2132     #else
2133         #define LV_USE_IMAGEBUTTON     1
2134     #endif
2135 #endif
2136 
2137 #ifndef LV_USE_KEYBOARD
2138     #ifdef LV_KCONFIG_PRESENT
2139         #ifdef CONFIG_LV_USE_KEYBOARD
2140             #define LV_USE_KEYBOARD CONFIG_LV_USE_KEYBOARD
2141         #else
2142             #define LV_USE_KEYBOARD 0
2143         #endif
2144     #else
2145         #define LV_USE_KEYBOARD   1
2146     #endif
2147 #endif
2148 
2149 #ifndef LV_USE_LABEL
2150     #ifdef LV_KCONFIG_PRESENT
2151         #ifdef CONFIG_LV_USE_LABEL
2152             #define LV_USE_LABEL CONFIG_LV_USE_LABEL
2153         #else
2154             #define LV_USE_LABEL 0
2155         #endif
2156     #else
2157         #define LV_USE_LABEL      1
2158     #endif
2159 #endif
2160 #if LV_USE_LABEL
2161     #ifndef LV_LABEL_TEXT_SELECTION
2162         #ifdef LV_KCONFIG_PRESENT
2163             #ifdef CONFIG_LV_LABEL_TEXT_SELECTION
2164                 #define LV_LABEL_TEXT_SELECTION CONFIG_LV_LABEL_TEXT_SELECTION
2165             #else
2166                 #define LV_LABEL_TEXT_SELECTION 0
2167             #endif
2168         #else
2169             #define LV_LABEL_TEXT_SELECTION 1   /**< Enable selecting text of the label */
2170         #endif
2171     #endif
2172     #ifndef LV_LABEL_LONG_TXT_HINT
2173         #ifdef LV_KCONFIG_PRESENT
2174             #ifdef CONFIG_LV_LABEL_LONG_TXT_HINT
2175                 #define LV_LABEL_LONG_TXT_HINT CONFIG_LV_LABEL_LONG_TXT_HINT
2176             #else
2177                 #define LV_LABEL_LONG_TXT_HINT 0
2178             #endif
2179         #else
2180             #define LV_LABEL_LONG_TXT_HINT 1    /**< Store some extra info in labels to speed up drawing of very long text */
2181         #endif
2182     #endif
2183     #ifndef LV_LABEL_WAIT_CHAR_COUNT
2184         #ifdef CONFIG_LV_LABEL_WAIT_CHAR_COUNT
2185             #define LV_LABEL_WAIT_CHAR_COUNT CONFIG_LV_LABEL_WAIT_CHAR_COUNT
2186         #else
2187             #define LV_LABEL_WAIT_CHAR_COUNT 3  /**< The count of wait chart */
2188         #endif
2189     #endif
2190 #endif
2191 
2192 #ifndef LV_USE_LED
2193     #ifdef LV_KCONFIG_PRESENT
2194         #ifdef CONFIG_LV_USE_LED
2195             #define LV_USE_LED CONFIG_LV_USE_LED
2196         #else
2197             #define LV_USE_LED 0
2198         #endif
2199     #else
2200         #define LV_USE_LED        1
2201     #endif
2202 #endif
2203 
2204 #ifndef LV_USE_LINE
2205     #ifdef LV_KCONFIG_PRESENT
2206         #ifdef CONFIG_LV_USE_LINE
2207             #define LV_USE_LINE CONFIG_LV_USE_LINE
2208         #else
2209             #define LV_USE_LINE 0
2210         #endif
2211     #else
2212         #define LV_USE_LINE       1
2213     #endif
2214 #endif
2215 
2216 #ifndef LV_USE_LIST
2217     #ifdef LV_KCONFIG_PRESENT
2218         #ifdef CONFIG_LV_USE_LIST
2219             #define LV_USE_LIST CONFIG_LV_USE_LIST
2220         #else
2221             #define LV_USE_LIST 0
2222         #endif
2223     #else
2224         #define LV_USE_LIST       1
2225     #endif
2226 #endif
2227 
2228 #ifndef LV_USE_LOTTIE
2229     #ifdef CONFIG_LV_USE_LOTTIE
2230         #define LV_USE_LOTTIE CONFIG_LV_USE_LOTTIE
2231     #else
2232         #define LV_USE_LOTTIE     0  /**< Requires: lv_canvas, thorvg */
2233     #endif
2234 #endif
2235 
2236 #ifndef LV_USE_MENU
2237     #ifdef LV_KCONFIG_PRESENT
2238         #ifdef CONFIG_LV_USE_MENU
2239             #define LV_USE_MENU CONFIG_LV_USE_MENU
2240         #else
2241             #define LV_USE_MENU 0
2242         #endif
2243     #else
2244         #define LV_USE_MENU       1
2245     #endif
2246 #endif
2247 
2248 #ifndef LV_USE_MSGBOX
2249     #ifdef LV_KCONFIG_PRESENT
2250         #ifdef CONFIG_LV_USE_MSGBOX
2251             #define LV_USE_MSGBOX CONFIG_LV_USE_MSGBOX
2252         #else
2253             #define LV_USE_MSGBOX 0
2254         #endif
2255     #else
2256         #define LV_USE_MSGBOX     1
2257     #endif
2258 #endif
2259 
2260 #ifndef LV_USE_ROLLER
2261     #ifdef LV_KCONFIG_PRESENT
2262         #ifdef CONFIG_LV_USE_ROLLER
2263             #define LV_USE_ROLLER CONFIG_LV_USE_ROLLER
2264         #else
2265             #define LV_USE_ROLLER 0
2266         #endif
2267     #else
2268         #define LV_USE_ROLLER     1   /**< Requires: lv_label */
2269     #endif
2270 #endif
2271 
2272 #ifndef LV_USE_SCALE
2273     #ifdef LV_KCONFIG_PRESENT
2274         #ifdef CONFIG_LV_USE_SCALE
2275             #define LV_USE_SCALE CONFIG_LV_USE_SCALE
2276         #else
2277             #define LV_USE_SCALE 0
2278         #endif
2279     #else
2280         #define LV_USE_SCALE      1
2281     #endif
2282 #endif
2283 
2284 #ifndef LV_USE_SLIDER
2285     #ifdef LV_KCONFIG_PRESENT
2286         #ifdef CONFIG_LV_USE_SLIDER
2287             #define LV_USE_SLIDER CONFIG_LV_USE_SLIDER
2288         #else
2289             #define LV_USE_SLIDER 0
2290         #endif
2291     #else
2292         #define LV_USE_SLIDER     1   /**< Requires: lv_bar */
2293     #endif
2294 #endif
2295 
2296 #ifndef LV_USE_SPAN
2297     #ifdef LV_KCONFIG_PRESENT
2298         #ifdef CONFIG_LV_USE_SPAN
2299             #define LV_USE_SPAN CONFIG_LV_USE_SPAN
2300         #else
2301             #define LV_USE_SPAN 0
2302         #endif
2303     #else
2304         #define LV_USE_SPAN       1
2305     #endif
2306 #endif
2307 #if LV_USE_SPAN
2308     /** A line of text can contain this maximum number of span descriptors. */
2309     #ifndef LV_SPAN_SNIPPET_STACK_SIZE
2310         #ifdef CONFIG_LV_SPAN_SNIPPET_STACK_SIZE
2311             #define LV_SPAN_SNIPPET_STACK_SIZE CONFIG_LV_SPAN_SNIPPET_STACK_SIZE
2312         #else
2313             #define LV_SPAN_SNIPPET_STACK_SIZE 64
2314         #endif
2315     #endif
2316 #endif
2317 
2318 #ifndef LV_USE_SPINBOX
2319     #ifdef LV_KCONFIG_PRESENT
2320         #ifdef CONFIG_LV_USE_SPINBOX
2321             #define LV_USE_SPINBOX CONFIG_LV_USE_SPINBOX
2322         #else
2323             #define LV_USE_SPINBOX 0
2324         #endif
2325     #else
2326         #define LV_USE_SPINBOX    1
2327     #endif
2328 #endif
2329 
2330 #ifndef LV_USE_SPINNER
2331     #ifdef LV_KCONFIG_PRESENT
2332         #ifdef CONFIG_LV_USE_SPINNER
2333             #define LV_USE_SPINNER CONFIG_LV_USE_SPINNER
2334         #else
2335             #define LV_USE_SPINNER 0
2336         #endif
2337     #else
2338         #define LV_USE_SPINNER    1
2339     #endif
2340 #endif
2341 
2342 #ifndef LV_USE_SWITCH
2343     #ifdef LV_KCONFIG_PRESENT
2344         #ifdef CONFIG_LV_USE_SWITCH
2345             #define LV_USE_SWITCH CONFIG_LV_USE_SWITCH
2346         #else
2347             #define LV_USE_SWITCH 0
2348         #endif
2349     #else
2350         #define LV_USE_SWITCH     1
2351     #endif
2352 #endif
2353 
2354 #ifndef LV_USE_TABLE
2355     #ifdef LV_KCONFIG_PRESENT
2356         #ifdef CONFIG_LV_USE_TABLE
2357             #define LV_USE_TABLE CONFIG_LV_USE_TABLE
2358         #else
2359             #define LV_USE_TABLE 0
2360         #endif
2361     #else
2362         #define LV_USE_TABLE      1
2363     #endif
2364 #endif
2365 
2366 #ifndef LV_USE_TABVIEW
2367     #ifdef LV_KCONFIG_PRESENT
2368         #ifdef CONFIG_LV_USE_TABVIEW
2369             #define LV_USE_TABVIEW CONFIG_LV_USE_TABVIEW
2370         #else
2371             #define LV_USE_TABVIEW 0
2372         #endif
2373     #else
2374         #define LV_USE_TABVIEW    1
2375     #endif
2376 #endif
2377 
2378 #ifndef LV_USE_TEXTAREA
2379     #ifdef LV_KCONFIG_PRESENT
2380         #ifdef CONFIG_LV_USE_TEXTAREA
2381             #define LV_USE_TEXTAREA CONFIG_LV_USE_TEXTAREA
2382         #else
2383             #define LV_USE_TEXTAREA 0
2384         #endif
2385     #else
2386         #define LV_USE_TEXTAREA   1   /**< Requires: lv_label */
2387     #endif
2388 #endif
2389 #if LV_USE_TEXTAREA != 0
2390     #ifndef LV_TEXTAREA_DEF_PWD_SHOW_TIME
2391         #ifdef CONFIG_LV_TEXTAREA_DEF_PWD_SHOW_TIME
2392             #define LV_TEXTAREA_DEF_PWD_SHOW_TIME CONFIG_LV_TEXTAREA_DEF_PWD_SHOW_TIME
2393         #else
2394             #define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500    /**< [ms] */
2395         #endif
2396     #endif
2397 #endif
2398 
2399 #ifndef LV_USE_TILEVIEW
2400     #ifdef LV_KCONFIG_PRESENT
2401         #ifdef CONFIG_LV_USE_TILEVIEW
2402             #define LV_USE_TILEVIEW CONFIG_LV_USE_TILEVIEW
2403         #else
2404             #define LV_USE_TILEVIEW 0
2405         #endif
2406     #else
2407         #define LV_USE_TILEVIEW   1
2408     #endif
2409 #endif
2410 
2411 #ifndef LV_USE_WIN
2412     #ifdef LV_KCONFIG_PRESENT
2413         #ifdef CONFIG_LV_USE_WIN
2414             #define LV_USE_WIN CONFIG_LV_USE_WIN
2415         #else
2416             #define LV_USE_WIN 0
2417         #endif
2418     #else
2419         #define LV_USE_WIN        1
2420     #endif
2421 #endif
2422 
2423 /*==================
2424  * THEMES
2425  *==================*/
2426 /* Documentation for themes can be found here: https://docs.lvgl.io/master/overview/style.html#themes . */
2427 
2428 /** A simple, impressive and very complete theme */
2429 #ifndef LV_USE_THEME_DEFAULT
2430     #ifdef LV_KCONFIG_PRESENT
2431         #ifdef CONFIG_LV_USE_THEME_DEFAULT
2432             #define LV_USE_THEME_DEFAULT CONFIG_LV_USE_THEME_DEFAULT
2433         #else
2434             #define LV_USE_THEME_DEFAULT 0
2435         #endif
2436     #else
2437         #define LV_USE_THEME_DEFAULT 1
2438     #endif
2439 #endif
2440 #if LV_USE_THEME_DEFAULT
2441     /** 0: Light mode; 1: Dark mode */
2442     #ifndef LV_THEME_DEFAULT_DARK
2443         #ifdef CONFIG_LV_THEME_DEFAULT_DARK
2444             #define LV_THEME_DEFAULT_DARK CONFIG_LV_THEME_DEFAULT_DARK
2445         #else
2446             #define LV_THEME_DEFAULT_DARK 0
2447         #endif
2448     #endif
2449 
2450     /** 1: Enable grow on press */
2451     #ifndef LV_THEME_DEFAULT_GROW
2452         #ifdef LV_KCONFIG_PRESENT
2453             #ifdef CONFIG_LV_THEME_DEFAULT_GROW
2454                 #define LV_THEME_DEFAULT_GROW CONFIG_LV_THEME_DEFAULT_GROW
2455             #else
2456                 #define LV_THEME_DEFAULT_GROW 0
2457             #endif
2458         #else
2459             #define LV_THEME_DEFAULT_GROW 1
2460         #endif
2461     #endif
2462 
2463     /** Default transition time in ms. */
2464     #ifndef LV_THEME_DEFAULT_TRANSITION_TIME
2465         #ifdef CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME
2466             #define LV_THEME_DEFAULT_TRANSITION_TIME CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME
2467         #else
2468             #define LV_THEME_DEFAULT_TRANSITION_TIME 80
2469         #endif
2470     #endif
2471 #endif /*LV_USE_THEME_DEFAULT*/
2472 
2473 /** A very simple theme that is a good starting point for a custom theme */
2474 #ifndef LV_USE_THEME_SIMPLE
2475     #ifdef LV_KCONFIG_PRESENT
2476         #ifdef CONFIG_LV_USE_THEME_SIMPLE
2477             #define LV_USE_THEME_SIMPLE CONFIG_LV_USE_THEME_SIMPLE
2478         #else
2479             #define LV_USE_THEME_SIMPLE 0
2480         #endif
2481     #else
2482         #define LV_USE_THEME_SIMPLE 1
2483     #endif
2484 #endif
2485 
2486 /** A theme designed for monochrome displays */
2487 #ifndef LV_USE_THEME_MONO
2488     #ifdef LV_KCONFIG_PRESENT
2489         #ifdef CONFIG_LV_USE_THEME_MONO
2490             #define LV_USE_THEME_MONO CONFIG_LV_USE_THEME_MONO
2491         #else
2492             #define LV_USE_THEME_MONO 0
2493         #endif
2494     #else
2495         #define LV_USE_THEME_MONO 1
2496     #endif
2497 #endif
2498 
2499 /*==================
2500  * LAYOUTS
2501  *==================*/
2502 /* Documentation for layouts can be found here: https://docs.lvgl.io/master/layouts/index.html . */
2503 
2504 /** A layout similar to Flexbox in CSS. */
2505 #ifndef LV_USE_FLEX
2506     #ifdef LV_KCONFIG_PRESENT
2507         #ifdef CONFIG_LV_USE_FLEX
2508             #define LV_USE_FLEX CONFIG_LV_USE_FLEX
2509         #else
2510             #define LV_USE_FLEX 0
2511         #endif
2512     #else
2513         #define LV_USE_FLEX 1
2514     #endif
2515 #endif
2516 
2517 /** A layout similar to Grid in CSS. */
2518 #ifndef LV_USE_GRID
2519     #ifdef LV_KCONFIG_PRESENT
2520         #ifdef CONFIG_LV_USE_GRID
2521             #define LV_USE_GRID CONFIG_LV_USE_GRID
2522         #else
2523             #define LV_USE_GRID 0
2524         #endif
2525     #else
2526         #define LV_USE_GRID 1
2527     #endif
2528 #endif
2529 
2530 /*====================
2531  * 3RD PARTS LIBRARIES
2532  *====================*/
2533 /* Documentation for libraries can be found here: https://docs.lvgl.io/master/libs/index.html . */
2534 
2535 /* File system interfaces for common APIs */
2536 
2537 /** Setting a default driver letter allows skipping the driver prefix in filepaths. */
2538 #ifndef LV_FS_DEFAULT_DRIVER_LETTER
2539     #ifdef CONFIG_LV_FS_DEFAULT_DRIVER_LETTER
2540         #define LV_FS_DEFAULT_DRIVER_LETTER CONFIG_LV_FS_DEFAULT_DRIVER_LETTER
2541     #else
2542         #define LV_FS_DEFAULT_DRIVER_LETTER '\0'
2543     #endif
2544 #endif
2545 
2546 /** API for fopen, fread, etc. */
2547 #ifndef LV_USE_FS_STDIO
2548     #ifdef CONFIG_LV_USE_FS_STDIO
2549         #define LV_USE_FS_STDIO CONFIG_LV_USE_FS_STDIO
2550     #else
2551         #define LV_USE_FS_STDIO 0
2552     #endif
2553 #endif
2554 #if LV_USE_FS_STDIO
2555     #ifndef LV_FS_STDIO_LETTER
2556         #ifdef CONFIG_LV_FS_STDIO_LETTER
2557             #define LV_FS_STDIO_LETTER CONFIG_LV_FS_STDIO_LETTER
2558         #else
2559             #define LV_FS_STDIO_LETTER '\0'     /**< Set an upper cased letter on which the drive will accessible (e.g. 'A') */
2560         #endif
2561     #endif
2562     #ifndef LV_FS_STDIO_PATH
2563         #ifdef CONFIG_LV_FS_STDIO_PATH
2564             #define LV_FS_STDIO_PATH CONFIG_LV_FS_STDIO_PATH
2565         #else
2566             #define LV_FS_STDIO_PATH ""         /**< Set the working directory. File/directory paths will be appended to it. */
2567         #endif
2568     #endif
2569     #ifndef LV_FS_STDIO_CACHE_SIZE
2570         #ifdef CONFIG_LV_FS_STDIO_CACHE_SIZE
2571             #define LV_FS_STDIO_CACHE_SIZE CONFIG_LV_FS_STDIO_CACHE_SIZE
2572         #else
2573             #define LV_FS_STDIO_CACHE_SIZE 0    /**< >0 to cache this number of bytes in lv_fs_read() */
2574         #endif
2575     #endif
2576 #endif
2577 
2578 /** API for open, read, etc. */
2579 #ifndef LV_USE_FS_POSIX
2580     #ifdef CONFIG_LV_USE_FS_POSIX
2581         #define LV_USE_FS_POSIX CONFIG_LV_USE_FS_POSIX
2582     #else
2583         #define LV_USE_FS_POSIX 0
2584     #endif
2585 #endif
2586 #if LV_USE_FS_POSIX
2587     #ifndef LV_FS_POSIX_LETTER
2588         #ifdef CONFIG_LV_FS_POSIX_LETTER
2589             #define LV_FS_POSIX_LETTER CONFIG_LV_FS_POSIX_LETTER
2590         #else
2591             #define LV_FS_POSIX_LETTER '\0'     /**< Set an upper cased letter on which the drive will accessible (e.g. 'A') */
2592         #endif
2593     #endif
2594     #ifndef LV_FS_POSIX_PATH
2595         #ifdef CONFIG_LV_FS_POSIX_PATH
2596             #define LV_FS_POSIX_PATH CONFIG_LV_FS_POSIX_PATH
2597         #else
2598             #define LV_FS_POSIX_PATH ""         /**< Set the working directory. File/directory paths will be appended to it. */
2599         #endif
2600     #endif
2601     #ifndef LV_FS_POSIX_CACHE_SIZE
2602         #ifdef CONFIG_LV_FS_POSIX_CACHE_SIZE
2603             #define LV_FS_POSIX_CACHE_SIZE CONFIG_LV_FS_POSIX_CACHE_SIZE
2604         #else
2605             #define LV_FS_POSIX_CACHE_SIZE 0    /**< >0 to cache this number of bytes in lv_fs_read() */
2606         #endif
2607     #endif
2608 #endif
2609 
2610 /** API for CreateFile, ReadFile, etc. */
2611 #ifndef LV_USE_FS_WIN32
2612     #ifdef CONFIG_LV_USE_FS_WIN32
2613         #define LV_USE_FS_WIN32 CONFIG_LV_USE_FS_WIN32
2614     #else
2615         #define LV_USE_FS_WIN32 0
2616     #endif
2617 #endif
2618 #if LV_USE_FS_WIN32
2619     #ifndef LV_FS_WIN32_LETTER
2620         #ifdef CONFIG_LV_FS_WIN32_LETTER
2621             #define LV_FS_WIN32_LETTER CONFIG_LV_FS_WIN32_LETTER
2622         #else
2623             #define LV_FS_WIN32_LETTER '\0'     /**< Set an upper cased letter on which the drive will accessible (e.g. 'A') */
2624         #endif
2625     #endif
2626     #ifndef LV_FS_WIN32_PATH
2627         #ifdef CONFIG_LV_FS_WIN32_PATH
2628             #define LV_FS_WIN32_PATH CONFIG_LV_FS_WIN32_PATH
2629         #else
2630             #define LV_FS_WIN32_PATH ""         /**< Set the working directory. File/directory paths will be appended to it. */
2631         #endif
2632     #endif
2633     #ifndef LV_FS_WIN32_CACHE_SIZE
2634         #ifdef CONFIG_LV_FS_WIN32_CACHE_SIZE
2635             #define LV_FS_WIN32_CACHE_SIZE CONFIG_LV_FS_WIN32_CACHE_SIZE
2636         #else
2637             #define LV_FS_WIN32_CACHE_SIZE 0    /**< >0 to cache this number of bytes in lv_fs_read() */
2638         #endif
2639     #endif
2640 #endif
2641 
2642 /** API for FATFS (needs to be added separately). Uses f_open, f_read, etc. */
2643 #ifndef LV_USE_FS_FATFS
2644     #ifdef CONFIG_LV_USE_FS_FATFS
2645         #define LV_USE_FS_FATFS CONFIG_LV_USE_FS_FATFS
2646     #else
2647         #define LV_USE_FS_FATFS 0
2648     #endif
2649 #endif
2650 #if LV_USE_FS_FATFS
2651     #ifndef LV_FS_FATFS_LETTER
2652         #ifdef CONFIG_LV_FS_FATFS_LETTER
2653             #define LV_FS_FATFS_LETTER CONFIG_LV_FS_FATFS_LETTER
2654         #else
2655             #define LV_FS_FATFS_LETTER '\0'     /**< Set an upper cased letter on which the drive will accessible (e.g. 'A') */
2656         #endif
2657     #endif
2658     #ifndef LV_FS_FATFS_PATH
2659         #ifdef CONFIG_LV_FS_FATFS_PATH
2660             #define LV_FS_FATFS_PATH CONFIG_LV_FS_FATFS_PATH
2661         #else
2662             #define LV_FS_FATFS_PATH ""         /**< Set the working directory. File/directory paths will be appended to it. */
2663         #endif
2664     #endif
2665     #ifndef LV_FS_FATFS_CACHE_SIZE
2666         #ifdef CONFIG_LV_FS_FATFS_CACHE_SIZE
2667             #define LV_FS_FATFS_CACHE_SIZE CONFIG_LV_FS_FATFS_CACHE_SIZE
2668         #else
2669             #define LV_FS_FATFS_CACHE_SIZE 0    /**< >0 to cache this number of bytes in lv_fs_read() */
2670         #endif
2671     #endif
2672 #endif
2673 
2674 /** API for memory-mapped file access. */
2675 #ifndef LV_USE_FS_MEMFS
2676     #ifdef CONFIG_LV_USE_FS_MEMFS
2677         #define LV_USE_FS_MEMFS CONFIG_LV_USE_FS_MEMFS
2678     #else
2679         #define LV_USE_FS_MEMFS 0
2680     #endif
2681 #endif
2682 #if LV_USE_FS_MEMFS
2683     #ifndef LV_FS_MEMFS_LETTER
2684         #ifdef CONFIG_LV_FS_MEMFS_LETTER
2685             #define LV_FS_MEMFS_LETTER CONFIG_LV_FS_MEMFS_LETTER
2686         #else
2687             #define LV_FS_MEMFS_LETTER '\0'     /**< Set an upper cased letter on which the drive will accessible (e.g. 'A') */
2688         #endif
2689     #endif
2690 #endif
2691 
2692 /** API for LittleFs. */
2693 #ifndef LV_USE_FS_LITTLEFS
2694     #ifdef CONFIG_LV_USE_FS_LITTLEFS
2695         #define LV_USE_FS_LITTLEFS CONFIG_LV_USE_FS_LITTLEFS
2696     #else
2697         #define LV_USE_FS_LITTLEFS 0
2698     #endif
2699 #endif
2700 #if LV_USE_FS_LITTLEFS
2701     #ifndef LV_FS_LITTLEFS_LETTER
2702         #ifdef CONFIG_LV_FS_LITTLEFS_LETTER
2703             #define LV_FS_LITTLEFS_LETTER CONFIG_LV_FS_LITTLEFS_LETTER
2704         #else
2705             #define LV_FS_LITTLEFS_LETTER '\0'  /**< Set an upper cased letter on which the drive will accessible (e.g. 'A') */
2706         #endif
2707     #endif
2708     #ifndef LV_FS_LITTLEFS_PATH
2709         #ifdef CONFIG_LV_FS_LITTLEFS_PATH
2710             #define LV_FS_LITTLEFS_PATH CONFIG_LV_FS_LITTLEFS_PATH
2711         #else
2712             #define LV_FS_LITTLEFS_PATH ""         /**< Set the working directory. File/directory paths will be appended to it. */
2713         #endif
2714     #endif
2715 #endif
2716 
2717 /** API for Arduino LittleFs. */
2718 #ifndef LV_USE_FS_ARDUINO_ESP_LITTLEFS
2719     #ifdef CONFIG_LV_USE_FS_ARDUINO_ESP_LITTLEFS
2720         #define LV_USE_FS_ARDUINO_ESP_LITTLEFS CONFIG_LV_USE_FS_ARDUINO_ESP_LITTLEFS
2721     #else
2722         #define LV_USE_FS_ARDUINO_ESP_LITTLEFS 0
2723     #endif
2724 #endif
2725 #if LV_USE_FS_ARDUINO_ESP_LITTLEFS
2726     #ifndef LV_FS_ARDUINO_ESP_LITTLEFS_LETTER
2727         #ifdef CONFIG_LV_FS_ARDUINO_ESP_LITTLEFS_LETTER
2728             #define LV_FS_ARDUINO_ESP_LITTLEFS_LETTER CONFIG_LV_FS_ARDUINO_ESP_LITTLEFS_LETTER
2729         #else
2730             #define LV_FS_ARDUINO_ESP_LITTLEFS_LETTER '\0'     /**< Set an upper cased letter on which the drive will accessible (e.g. 'A') */
2731         #endif
2732     #endif
2733     #ifndef LV_FS_ARDUINO_ESP_LITTLEFS_PATH
2734         #ifdef CONFIG_LV_FS_ARDUINO_ESP_LITTLEFS_PATH
2735             #define LV_FS_ARDUINO_ESP_LITTLEFS_PATH CONFIG_LV_FS_ARDUINO_ESP_LITTLEFS_PATH
2736         #else
2737             #define LV_FS_ARDUINO_ESP_LITTLEFS_PATH ""         /**< Set the working directory. File/directory paths will be appended to it. */
2738         #endif
2739     #endif
2740 #endif
2741 
2742 /** API for Arduino Sd. */
2743 #ifndef LV_USE_FS_ARDUINO_SD
2744     #ifdef CONFIG_LV_USE_FS_ARDUINO_SD
2745         #define LV_USE_FS_ARDUINO_SD CONFIG_LV_USE_FS_ARDUINO_SD
2746     #else
2747         #define LV_USE_FS_ARDUINO_SD 0
2748     #endif
2749 #endif
2750 #if LV_USE_FS_ARDUINO_SD
2751     #ifndef LV_FS_ARDUINO_SD_LETTER
2752         #ifdef CONFIG_LV_FS_ARDUINO_SD_LETTER
2753             #define LV_FS_ARDUINO_SD_LETTER CONFIG_LV_FS_ARDUINO_SD_LETTER
2754         #else
2755             #define LV_FS_ARDUINO_SD_LETTER '\0'          /**< Set an upper cased letter on which the drive will accessible (e.g. 'A') */
2756         #endif
2757     #endif
2758     #ifndef LV_FS_ARDUINO_SD_PATH
2759         #ifdef CONFIG_LV_FS_ARDUINO_SD_PATH
2760             #define LV_FS_ARDUINO_SD_PATH CONFIG_LV_FS_ARDUINO_SD_PATH
2761         #else
2762             #define LV_FS_ARDUINO_SD_PATH ""         /**< Set the working directory. File/directory paths will be appended to it. */
2763         #endif
2764     #endif
2765 #endif
2766 
2767 /** API for UEFI */
2768 #ifndef LV_USE_FS_UEFI
2769     #ifdef CONFIG_LV_USE_FS_UEFI
2770         #define LV_USE_FS_UEFI CONFIG_LV_USE_FS_UEFI
2771     #else
2772         #define LV_USE_FS_UEFI 0
2773     #endif
2774 #endif
2775 #if LV_USE_FS_UEFI
2776     #ifndef LV_FS_UEFI_LETTER
2777         #ifdef CONFIG_LV_FS_UEFI_LETTER
2778             #define LV_FS_UEFI_LETTER CONFIG_LV_FS_UEFI_LETTER
2779         #else
2780             #define LV_FS_UEFI_LETTER '\0'          /**< Set an upper cased letter on which the drive will accessible (e.g. 'A') */
2781         #endif
2782     #endif
2783 #endif
2784 
2785 /** LODEPNG decoder library */
2786 #ifndef LV_USE_LODEPNG
2787     #ifdef CONFIG_LV_USE_LODEPNG
2788         #define LV_USE_LODEPNG CONFIG_LV_USE_LODEPNG
2789     #else
2790         #define LV_USE_LODEPNG 0
2791     #endif
2792 #endif
2793 
2794 /** PNG decoder(libpng) library */
2795 #ifndef LV_USE_LIBPNG
2796     #ifdef CONFIG_LV_USE_LIBPNG
2797         #define LV_USE_LIBPNG CONFIG_LV_USE_LIBPNG
2798     #else
2799         #define LV_USE_LIBPNG 0
2800     #endif
2801 #endif
2802 
2803 /** BMP decoder library */
2804 #ifndef LV_USE_BMP
2805     #ifdef CONFIG_LV_USE_BMP
2806         #define LV_USE_BMP CONFIG_LV_USE_BMP
2807     #else
2808         #define LV_USE_BMP 0
2809     #endif
2810 #endif
2811 
2812 /** JPG + split JPG decoder library.
2813  *  Split JPG is a custom format optimized for embedded systems. */
2814 #ifndef LV_USE_TJPGD
2815     #ifdef CONFIG_LV_USE_TJPGD
2816         #define LV_USE_TJPGD CONFIG_LV_USE_TJPGD
2817     #else
2818         #define LV_USE_TJPGD 0
2819     #endif
2820 #endif
2821 
2822 /** libjpeg-turbo decoder library.
2823  *  - Supports complete JPEG specifications and high-performance JPEG decoding. */
2824 #ifndef LV_USE_LIBJPEG_TURBO
2825     #ifdef CONFIG_LV_USE_LIBJPEG_TURBO
2826         #define LV_USE_LIBJPEG_TURBO CONFIG_LV_USE_LIBJPEG_TURBO
2827     #else
2828         #define LV_USE_LIBJPEG_TURBO 0
2829     #endif
2830 #endif
2831 
2832 /** GIF decoder library */
2833 #ifndef LV_USE_GIF
2834     #ifdef CONFIG_LV_USE_GIF
2835         #define LV_USE_GIF CONFIG_LV_USE_GIF
2836     #else
2837         #define LV_USE_GIF 0
2838     #endif
2839 #endif
2840 #if LV_USE_GIF
2841     /** GIF decoder accelerate */
2842     #ifndef LV_GIF_CACHE_DECODE_DATA
2843         #ifdef CONFIG_LV_GIF_CACHE_DECODE_DATA
2844             #define LV_GIF_CACHE_DECODE_DATA CONFIG_LV_GIF_CACHE_DECODE_DATA
2845         #else
2846             #define LV_GIF_CACHE_DECODE_DATA 0
2847         #endif
2848     #endif
2849 #endif
2850 
2851 
2852 /** Decode bin images to RAM */
2853 #ifndef LV_BIN_DECODER_RAM_LOAD
2854     #ifdef CONFIG_LV_BIN_DECODER_RAM_LOAD
2855         #define LV_BIN_DECODER_RAM_LOAD CONFIG_LV_BIN_DECODER_RAM_LOAD
2856     #else
2857         #define LV_BIN_DECODER_RAM_LOAD 0
2858     #endif
2859 #endif
2860 
2861 /** RLE decompress library */
2862 #ifndef LV_USE_RLE
2863     #ifdef CONFIG_LV_USE_RLE
2864         #define LV_USE_RLE CONFIG_LV_USE_RLE
2865     #else
2866         #define LV_USE_RLE 0
2867     #endif
2868 #endif
2869 
2870 /** QR code library */
2871 #ifndef LV_USE_QRCODE
2872     #ifdef CONFIG_LV_USE_QRCODE
2873         #define LV_USE_QRCODE CONFIG_LV_USE_QRCODE
2874     #else
2875         #define LV_USE_QRCODE 0
2876     #endif
2877 #endif
2878 
2879 /** Barcode code library */
2880 #ifndef LV_USE_BARCODE
2881     #ifdef CONFIG_LV_USE_BARCODE
2882         #define LV_USE_BARCODE CONFIG_LV_USE_BARCODE
2883     #else
2884         #define LV_USE_BARCODE 0
2885     #endif
2886 #endif
2887 
2888 /** FreeType library */
2889 #ifndef LV_USE_FREETYPE
2890     #ifdef CONFIG_LV_USE_FREETYPE
2891         #define LV_USE_FREETYPE CONFIG_LV_USE_FREETYPE
2892     #else
2893         #define LV_USE_FREETYPE 0
2894     #endif
2895 #endif
2896 #if LV_USE_FREETYPE
2897     /** Let FreeType use LVGL memory and file porting */
2898     #ifndef LV_FREETYPE_USE_LVGL_PORT
2899         #ifdef CONFIG_LV_FREETYPE_USE_LVGL_PORT
2900             #define LV_FREETYPE_USE_LVGL_PORT CONFIG_LV_FREETYPE_USE_LVGL_PORT
2901         #else
2902             #define LV_FREETYPE_USE_LVGL_PORT 0
2903         #endif
2904     #endif
2905 
2906     /** Cache count of glyphs in FreeType, i.e. number of glyphs that can be cached.
2907      *  The higher the value, the more memory will be used. */
2908     #ifndef LV_FREETYPE_CACHE_FT_GLYPH_CNT
2909         #ifdef CONFIG_LV_FREETYPE_CACHE_FT_GLYPH_CNT
2910             #define LV_FREETYPE_CACHE_FT_GLYPH_CNT CONFIG_LV_FREETYPE_CACHE_FT_GLYPH_CNT
2911         #else
2912             #define LV_FREETYPE_CACHE_FT_GLYPH_CNT 256
2913         #endif
2914     #endif
2915 #endif
2916 
2917 /** Built-in TTF decoder */
2918 #ifndef LV_USE_TINY_TTF
2919     #ifdef CONFIG_LV_USE_TINY_TTF
2920         #define LV_USE_TINY_TTF CONFIG_LV_USE_TINY_TTF
2921     #else
2922         #define LV_USE_TINY_TTF 0
2923     #endif
2924 #endif
2925 #if LV_USE_TINY_TTF
2926     /* Enable loading TTF data from files */
2927     #ifndef LV_TINY_TTF_FILE_SUPPORT
2928         #ifdef CONFIG_LV_TINY_TTF_FILE_SUPPORT
2929             #define LV_TINY_TTF_FILE_SUPPORT CONFIG_LV_TINY_TTF_FILE_SUPPORT
2930         #else
2931             #define LV_TINY_TTF_FILE_SUPPORT 0
2932         #endif
2933     #endif
2934     #ifndef LV_TINY_TTF_CACHE_GLYPH_CNT
2935         #ifdef CONFIG_LV_TINY_TTF_CACHE_GLYPH_CNT
2936             #define LV_TINY_TTF_CACHE_GLYPH_CNT CONFIG_LV_TINY_TTF_CACHE_GLYPH_CNT
2937         #else
2938             #define LV_TINY_TTF_CACHE_GLYPH_CNT 256
2939         #endif
2940     #endif
2941 #endif
2942 
2943 /** Rlottie library */
2944 #ifndef LV_USE_RLOTTIE
2945     #ifdef CONFIG_LV_USE_RLOTTIE
2946         #define LV_USE_RLOTTIE CONFIG_LV_USE_RLOTTIE
2947     #else
2948         #define LV_USE_RLOTTIE 0
2949     #endif
2950 #endif
2951 
2952 /** Enable Vector Graphic APIs
2953  *  - Requires `LV_USE_MATRIX = 1` */
2954 #ifndef LV_USE_VECTOR_GRAPHIC
2955     #ifdef CONFIG_LV_USE_VECTOR_GRAPHIC
2956         #define LV_USE_VECTOR_GRAPHIC CONFIG_LV_USE_VECTOR_GRAPHIC
2957     #else
2958         #define LV_USE_VECTOR_GRAPHIC  0
2959     #endif
2960 #endif
2961 
2962 /** Enable ThorVG (vector graphics library) from the src/libs folder */
2963 #ifndef LV_USE_THORVG_INTERNAL
2964     #ifdef CONFIG_LV_USE_THORVG_INTERNAL
2965         #define LV_USE_THORVG_INTERNAL CONFIG_LV_USE_THORVG_INTERNAL
2966     #else
2967         #define LV_USE_THORVG_INTERNAL 0
2968     #endif
2969 #endif
2970 
2971 /** Enable ThorVG by assuming that its installed and linked to the project */
2972 #ifndef LV_USE_THORVG_EXTERNAL
2973     #ifdef CONFIG_LV_USE_THORVG_EXTERNAL
2974         #define LV_USE_THORVG_EXTERNAL CONFIG_LV_USE_THORVG_EXTERNAL
2975     #else
2976         #define LV_USE_THORVG_EXTERNAL 0
2977     #endif
2978 #endif
2979 
2980 /** Use lvgl built-in LZ4 lib */
2981 #ifndef LV_USE_LZ4_INTERNAL
2982     #ifdef CONFIG_LV_USE_LZ4_INTERNAL
2983         #define LV_USE_LZ4_INTERNAL CONFIG_LV_USE_LZ4_INTERNAL
2984     #else
2985         #define LV_USE_LZ4_INTERNAL  0
2986     #endif
2987 #endif
2988 
2989 /** Use external LZ4 library */
2990 #ifndef LV_USE_LZ4_EXTERNAL
2991     #ifdef CONFIG_LV_USE_LZ4_EXTERNAL
2992         #define LV_USE_LZ4_EXTERNAL CONFIG_LV_USE_LZ4_EXTERNAL
2993     #else
2994         #define LV_USE_LZ4_EXTERNAL  0
2995     #endif
2996 #endif
2997 
2998 /*SVG library
2999  *  - Requires `LV_USE_VECTOR_GRAPHIC = 1` */
3000 #ifndef LV_USE_SVG
3001     #ifdef CONFIG_LV_USE_SVG
3002         #define LV_USE_SVG CONFIG_LV_USE_SVG
3003     #else
3004         #define LV_USE_SVG 0
3005     #endif
3006 #endif
3007 #ifndef LV_USE_SVG_ANIMATION
3008     #ifdef CONFIG_LV_USE_SVG_ANIMATION
3009         #define LV_USE_SVG_ANIMATION CONFIG_LV_USE_SVG_ANIMATION
3010     #else
3011         #define LV_USE_SVG_ANIMATION 0
3012     #endif
3013 #endif
3014 #ifndef LV_USE_SVG_DEBUG
3015     #ifdef CONFIG_LV_USE_SVG_DEBUG
3016         #define LV_USE_SVG_DEBUG CONFIG_LV_USE_SVG_DEBUG
3017     #else
3018         #define LV_USE_SVG_DEBUG 0
3019     #endif
3020 #endif
3021 
3022 /** FFmpeg library for image decoding and playing videos.
3023  *  Supports all major image formats so do not enable other image decoder with it. */
3024 #ifndef LV_USE_FFMPEG
3025     #ifdef CONFIG_LV_USE_FFMPEG
3026         #define LV_USE_FFMPEG CONFIG_LV_USE_FFMPEG
3027     #else
3028         #define LV_USE_FFMPEG 0
3029     #endif
3030 #endif
3031 #if LV_USE_FFMPEG
3032     /** Dump input information to stderr */
3033     #ifndef LV_FFMPEG_DUMP_FORMAT
3034         #ifdef CONFIG_LV_FFMPEG_DUMP_FORMAT
3035             #define LV_FFMPEG_DUMP_FORMAT CONFIG_LV_FFMPEG_DUMP_FORMAT
3036         #else
3037             #define LV_FFMPEG_DUMP_FORMAT 0
3038         #endif
3039     #endif
3040     /** Use lvgl file path in FFmpeg Player widget
3041      *  You won't be able to open URLs after enabling this feature.
3042      *  Note that FFmpeg image decoder will always use lvgl file system. */
3043     #ifndef LV_FFMPEG_PLAYER_USE_LV_FS
3044         #ifdef CONFIG_LV_FFMPEG_PLAYER_USE_LV_FS
3045             #define LV_FFMPEG_PLAYER_USE_LV_FS CONFIG_LV_FFMPEG_PLAYER_USE_LV_FS
3046         #else
3047             #define LV_FFMPEG_PLAYER_USE_LV_FS 0
3048         #endif
3049     #endif
3050 #endif
3051 
3052 /*==================
3053  * OTHERS
3054  *==================*/
3055 /* Documentation for several of the below items can be found here: https://docs.lvgl.io/master/others/index.html . */
3056 
3057 /** 1: Enable API to take snapshot for object */
3058 #ifndef LV_USE_SNAPSHOT
3059     #ifdef CONFIG_LV_USE_SNAPSHOT
3060         #define LV_USE_SNAPSHOT CONFIG_LV_USE_SNAPSHOT
3061     #else
3062         #define LV_USE_SNAPSHOT 0
3063     #endif
3064 #endif
3065 
3066 /** 1: Enable system monitor component */
3067 #ifndef LV_USE_SYSMON
3068     #ifdef CONFIG_LV_USE_SYSMON
3069         #define LV_USE_SYSMON CONFIG_LV_USE_SYSMON
3070     #else
3071         #define LV_USE_SYSMON   0
3072     #endif
3073 #endif
3074 #if LV_USE_SYSMON
3075     /** Get the idle percentage. E.g. uint32_t my_get_idle(void); */
3076     #ifndef LV_SYSMON_GET_IDLE
3077         #ifdef CONFIG_LV_SYSMON_GET_IDLE
3078             #define LV_SYSMON_GET_IDLE CONFIG_LV_SYSMON_GET_IDLE
3079         #else
3080             #define LV_SYSMON_GET_IDLE lv_timer_get_idle
3081         #endif
3082     #endif
3083 
3084     /** 1: Show CPU usage and FPS count.
3085      *  - Requires `LV_USE_SYSMON = 1` */
3086     #ifndef LV_USE_PERF_MONITOR
3087         #ifdef CONFIG_LV_USE_PERF_MONITOR
3088             #define LV_USE_PERF_MONITOR CONFIG_LV_USE_PERF_MONITOR
3089         #else
3090             #define LV_USE_PERF_MONITOR 0
3091         #endif
3092     #endif
3093     #if LV_USE_PERF_MONITOR
3094         #ifndef LV_USE_PERF_MONITOR_POS
3095             #ifdef CONFIG_LV_USE_PERF_MONITOR_POS
3096                 #define LV_USE_PERF_MONITOR_POS CONFIG_LV_USE_PERF_MONITOR_POS
3097             #else
3098                 #define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
3099             #endif
3100         #endif
3101 
3102         /** 0: Displays performance data on the screen; 1: Prints performance data using log. */
3103         #ifndef LV_USE_PERF_MONITOR_LOG_MODE
3104             #ifdef CONFIG_LV_USE_PERF_MONITOR_LOG_MODE
3105                 #define LV_USE_PERF_MONITOR_LOG_MODE CONFIG_LV_USE_PERF_MONITOR_LOG_MODE
3106             #else
3107                 #define LV_USE_PERF_MONITOR_LOG_MODE 0
3108             #endif
3109         #endif
3110     #endif
3111 
3112     /** 1: Show used memory and memory fragmentation.
3113      *     - Requires `LV_USE_STDLIB_MALLOC = LV_STDLIB_BUILTIN`
3114      *     - Requires `LV_USE_SYSMON = 1`*/
3115     #ifndef LV_USE_MEM_MONITOR
3116         #ifdef CONFIG_LV_USE_MEM_MONITOR
3117             #define LV_USE_MEM_MONITOR CONFIG_LV_USE_MEM_MONITOR
3118         #else
3119             #define LV_USE_MEM_MONITOR 0
3120         #endif
3121     #endif
3122     #if LV_USE_MEM_MONITOR
3123         #ifndef LV_USE_MEM_MONITOR_POS
3124             #ifdef CONFIG_LV_USE_MEM_MONITOR_POS
3125                 #define LV_USE_MEM_MONITOR_POS CONFIG_LV_USE_MEM_MONITOR_POS
3126             #else
3127                 #define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
3128             #endif
3129         #endif
3130     #endif
3131 #endif /*LV_USE_SYSMON*/
3132 
3133 /** 1: Enable runtime performance profiler */
3134 #ifndef LV_USE_PROFILER
3135     #ifdef CONFIG_LV_USE_PROFILER
3136         #define LV_USE_PROFILER CONFIG_LV_USE_PROFILER
3137     #else
3138         #define LV_USE_PROFILER 0
3139     #endif
3140 #endif
3141 #if LV_USE_PROFILER
3142     /** 1: Enable the built-in profiler */
3143     #ifndef LV_USE_PROFILER_BUILTIN
3144         #ifdef LV_KCONFIG_PRESENT
3145             #ifdef CONFIG_LV_USE_PROFILER_BUILTIN
3146                 #define LV_USE_PROFILER_BUILTIN CONFIG_LV_USE_PROFILER_BUILTIN
3147             #else
3148                 #define LV_USE_PROFILER_BUILTIN 0
3149             #endif
3150         #else
3151             #define LV_USE_PROFILER_BUILTIN 1
3152         #endif
3153     #endif
3154     #if LV_USE_PROFILER_BUILTIN
3155         /** Default profiler trace buffer size */
3156         #ifndef LV_PROFILER_BUILTIN_BUF_SIZE
3157             #ifdef CONFIG_LV_PROFILER_BUILTIN_BUF_SIZE
3158                 #define LV_PROFILER_BUILTIN_BUF_SIZE CONFIG_LV_PROFILER_BUILTIN_BUF_SIZE
3159             #else
3160                 #define LV_PROFILER_BUILTIN_BUF_SIZE (16 * 1024)     /**< [bytes] */
3161             #endif
3162         #endif
3163     #endif
3164 
3165     /** Header to include for profiler */
3166     #ifndef LV_PROFILER_INCLUDE
3167         #ifdef CONFIG_LV_PROFILER_INCLUDE
3168             #define LV_PROFILER_INCLUDE CONFIG_LV_PROFILER_INCLUDE
3169         #else
3170             #define LV_PROFILER_INCLUDE "lvgl/src/misc/lv_profiler_builtin.h"
3171         #endif
3172     #endif
3173 
3174     /** Profiler start point function */
3175     #ifndef LV_PROFILER_BEGIN
3176         #ifdef CONFIG_LV_PROFILER_BEGIN
3177             #define LV_PROFILER_BEGIN CONFIG_LV_PROFILER_BEGIN
3178         #else
3179             #define LV_PROFILER_BEGIN    LV_PROFILER_BUILTIN_BEGIN
3180         #endif
3181     #endif
3182 
3183     /** Profiler end point function */
3184     #ifndef LV_PROFILER_END
3185         #ifdef CONFIG_LV_PROFILER_END
3186             #define LV_PROFILER_END CONFIG_LV_PROFILER_END
3187         #else
3188             #define LV_PROFILER_END      LV_PROFILER_BUILTIN_END
3189         #endif
3190     #endif
3191 
3192     /** Profiler start point function with custom tag */
3193     #ifndef LV_PROFILER_BEGIN_TAG
3194         #ifdef CONFIG_LV_PROFILER_BEGIN_TAG
3195             #define LV_PROFILER_BEGIN_TAG CONFIG_LV_PROFILER_BEGIN_TAG
3196         #else
3197             #define LV_PROFILER_BEGIN_TAG LV_PROFILER_BUILTIN_BEGIN_TAG
3198         #endif
3199     #endif
3200 
3201     /** Profiler end point function with custom tag */
3202     #ifndef LV_PROFILER_END_TAG
3203         #ifdef CONFIG_LV_PROFILER_END_TAG
3204             #define LV_PROFILER_END_TAG CONFIG_LV_PROFILER_END_TAG
3205         #else
3206             #define LV_PROFILER_END_TAG   LV_PROFILER_BUILTIN_END_TAG
3207         #endif
3208     #endif
3209 
3210     /*Enable layout profiler*/
3211     #ifndef LV_PROFILER_LAYOUT
3212         #ifdef LV_KCONFIG_PRESENT
3213             #ifdef CONFIG_LV_PROFILER_LAYOUT
3214                 #define LV_PROFILER_LAYOUT CONFIG_LV_PROFILER_LAYOUT
3215             #else
3216                 #define LV_PROFILER_LAYOUT 0
3217             #endif
3218         #else
3219             #define LV_PROFILER_LAYOUT 1
3220         #endif
3221     #endif
3222 
3223     /*Enable disp refr profiler*/
3224     #ifndef LV_PROFILER_REFR
3225         #ifdef LV_KCONFIG_PRESENT
3226             #ifdef CONFIG_LV_PROFILER_REFR
3227                 #define LV_PROFILER_REFR CONFIG_LV_PROFILER_REFR
3228             #else
3229                 #define LV_PROFILER_REFR 0
3230             #endif
3231         #else
3232             #define LV_PROFILER_REFR 1
3233         #endif
3234     #endif
3235 
3236     /*Enable draw profiler*/
3237     #ifndef LV_PROFILER_DRAW
3238         #ifdef LV_KCONFIG_PRESENT
3239             #ifdef CONFIG_LV_PROFILER_DRAW
3240                 #define LV_PROFILER_DRAW CONFIG_LV_PROFILER_DRAW
3241             #else
3242                 #define LV_PROFILER_DRAW 0
3243             #endif
3244         #else
3245             #define LV_PROFILER_DRAW 1
3246         #endif
3247     #endif
3248 
3249     /*Enable indev profiler*/
3250     #ifndef LV_PROFILER_INDEV
3251         #ifdef LV_KCONFIG_PRESENT
3252             #ifdef CONFIG_LV_PROFILER_INDEV
3253                 #define LV_PROFILER_INDEV CONFIG_LV_PROFILER_INDEV
3254             #else
3255                 #define LV_PROFILER_INDEV 0
3256             #endif
3257         #else
3258             #define LV_PROFILER_INDEV 1
3259         #endif
3260     #endif
3261 
3262     /*Enable decoder profiler*/
3263     #ifndef LV_PROFILER_DECODER
3264         #ifdef LV_KCONFIG_PRESENT
3265             #ifdef CONFIG_LV_PROFILER_DECODER
3266                 #define LV_PROFILER_DECODER CONFIG_LV_PROFILER_DECODER
3267             #else
3268                 #define LV_PROFILER_DECODER 0
3269             #endif
3270         #else
3271             #define LV_PROFILER_DECODER 1
3272         #endif
3273     #endif
3274 
3275     /*Enable font profiler*/
3276     #ifndef LV_PROFILER_FONT
3277         #ifdef LV_KCONFIG_PRESENT
3278             #ifdef CONFIG_LV_PROFILER_FONT
3279                 #define LV_PROFILER_FONT CONFIG_LV_PROFILER_FONT
3280             #else
3281                 #define LV_PROFILER_FONT 0
3282             #endif
3283         #else
3284             #define LV_PROFILER_FONT 1
3285         #endif
3286     #endif
3287 
3288     /*Enable fs profiler*/
3289     #ifndef LV_PROFILER_FS
3290         #ifdef LV_KCONFIG_PRESENT
3291             #ifdef CONFIG_LV_PROFILER_FS
3292                 #define LV_PROFILER_FS CONFIG_LV_PROFILER_FS
3293             #else
3294                 #define LV_PROFILER_FS 0
3295             #endif
3296         #else
3297             #define LV_PROFILER_FS 1
3298         #endif
3299     #endif
3300 
3301     /*Enable style profiler*/
3302     #ifndef LV_PROFILER_STYLE
3303         #ifdef CONFIG_LV_PROFILER_STYLE
3304             #define LV_PROFILER_STYLE CONFIG_LV_PROFILER_STYLE
3305         #else
3306             #define LV_PROFILER_STYLE 0
3307         #endif
3308     #endif
3309 
3310     /*Enable timer profiler*/
3311     #ifndef LV_PROFILER_TIMER
3312         #ifdef LV_KCONFIG_PRESENT
3313             #ifdef CONFIG_LV_PROFILER_TIMER
3314                 #define LV_PROFILER_TIMER CONFIG_LV_PROFILER_TIMER
3315             #else
3316                 #define LV_PROFILER_TIMER 0
3317             #endif
3318         #else
3319             #define LV_PROFILER_TIMER 1
3320         #endif
3321     #endif
3322 
3323     /*Enable cache profiler*/
3324     #ifndef LV_PROFILER_CACHE
3325         #ifdef LV_KCONFIG_PRESENT
3326             #ifdef CONFIG_LV_PROFILER_CACHE
3327                 #define LV_PROFILER_CACHE CONFIG_LV_PROFILER_CACHE
3328             #else
3329                 #define LV_PROFILER_CACHE 0
3330             #endif
3331         #else
3332             #define LV_PROFILER_CACHE 1
3333         #endif
3334     #endif
3335 
3336     /*Enable event profiler*/
3337     #ifndef LV_PROFILER_EVENT
3338         #ifdef LV_KCONFIG_PRESENT
3339             #ifdef CONFIG_LV_PROFILER_EVENT
3340                 #define LV_PROFILER_EVENT CONFIG_LV_PROFILER_EVENT
3341             #else
3342                 #define LV_PROFILER_EVENT 0
3343             #endif
3344         #else
3345             #define LV_PROFILER_EVENT 1
3346         #endif
3347     #endif
3348 #endif
3349 
3350 /** 1: Enable Monkey test */
3351 #ifndef LV_USE_MONKEY
3352     #ifdef CONFIG_LV_USE_MONKEY
3353         #define LV_USE_MONKEY CONFIG_LV_USE_MONKEY
3354     #else
3355         #define LV_USE_MONKEY 0
3356     #endif
3357 #endif
3358 
3359 /** 1: Enable grid navigation */
3360 #ifndef LV_USE_GRIDNAV
3361     #ifdef CONFIG_LV_USE_GRIDNAV
3362         #define LV_USE_GRIDNAV CONFIG_LV_USE_GRIDNAV
3363     #else
3364         #define LV_USE_GRIDNAV 0
3365     #endif
3366 #endif
3367 
3368 /** 1: Enable `lv_obj` fragment logic */
3369 #ifndef LV_USE_FRAGMENT
3370     #ifdef CONFIG_LV_USE_FRAGMENT
3371         #define LV_USE_FRAGMENT CONFIG_LV_USE_FRAGMENT
3372     #else
3373         #define LV_USE_FRAGMENT 0
3374     #endif
3375 #endif
3376 
3377 /** 1: Support using images as font in label or span widgets */
3378 #ifndef LV_USE_IMGFONT
3379     #ifdef CONFIG_LV_USE_IMGFONT
3380         #define LV_USE_IMGFONT CONFIG_LV_USE_IMGFONT
3381     #else
3382         #define LV_USE_IMGFONT 0
3383     #endif
3384 #endif
3385 
3386 /** 1: Enable an observer pattern implementation */
3387 #ifndef LV_USE_OBSERVER
3388     #ifdef LV_KCONFIG_PRESENT
3389         #ifdef CONFIG_LV_USE_OBSERVER
3390             #define LV_USE_OBSERVER CONFIG_LV_USE_OBSERVER
3391         #else
3392             #define LV_USE_OBSERVER 0
3393         #endif
3394     #else
3395         #define LV_USE_OBSERVER 1
3396     #endif
3397 #endif
3398 
3399 /** 1: Enable Pinyin input method
3400  *  - Requires: lv_keyboard */
3401 #ifndef LV_USE_IME_PINYIN
3402     #ifdef CONFIG_LV_USE_IME_PINYIN
3403         #define LV_USE_IME_PINYIN CONFIG_LV_USE_IME_PINYIN
3404     #else
3405         #define LV_USE_IME_PINYIN 0
3406     #endif
3407 #endif
3408 #if LV_USE_IME_PINYIN
3409     /** 1: Use default thesaurus.
3410      *  @note  If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesaurus. */
3411     #ifndef LV_IME_PINYIN_USE_DEFAULT_DICT
3412         #ifdef LV_KCONFIG_PRESENT
3413             #ifdef CONFIG_LV_IME_PINYIN_USE_DEFAULT_DICT
3414                 #define LV_IME_PINYIN_USE_DEFAULT_DICT CONFIG_LV_IME_PINYIN_USE_DEFAULT_DICT
3415             #else
3416                 #define LV_IME_PINYIN_USE_DEFAULT_DICT 0
3417             #endif
3418         #else
3419             #define LV_IME_PINYIN_USE_DEFAULT_DICT 1
3420         #endif
3421     #endif
3422     /** Set maximum number of candidate panels that can be displayed.
3423      *  @note  This needs to be adjusted according to size of screen. */
3424     #ifndef LV_IME_PINYIN_CAND_TEXT_NUM
3425         #ifdef CONFIG_LV_IME_PINYIN_CAND_TEXT_NUM
3426             #define LV_IME_PINYIN_CAND_TEXT_NUM CONFIG_LV_IME_PINYIN_CAND_TEXT_NUM
3427         #else
3428             #define LV_IME_PINYIN_CAND_TEXT_NUM 6
3429         #endif
3430     #endif
3431 
3432     /** Use 9-key input (k9). */
3433     #ifndef LV_IME_PINYIN_USE_K9_MODE
3434         #ifdef LV_KCONFIG_PRESENT
3435             #ifdef CONFIG_LV_IME_PINYIN_USE_K9_MODE
3436                 #define LV_IME_PINYIN_USE_K9_MODE CONFIG_LV_IME_PINYIN_USE_K9_MODE
3437             #else
3438                 #define LV_IME_PINYIN_USE_K9_MODE 0
3439             #endif
3440         #else
3441             #define LV_IME_PINYIN_USE_K9_MODE      1
3442         #endif
3443     #endif
3444     #if LV_IME_PINYIN_USE_K9_MODE == 1
3445         #ifndef LV_IME_PINYIN_K9_CAND_TEXT_NUM
3446             #ifdef CONFIG_LV_IME_PINYIN_K9_CAND_TEXT_NUM
3447                 #define LV_IME_PINYIN_K9_CAND_TEXT_NUM CONFIG_LV_IME_PINYIN_K9_CAND_TEXT_NUM
3448             #else
3449                 #define LV_IME_PINYIN_K9_CAND_TEXT_NUM 3
3450             #endif
3451         #endif
3452     #endif /*LV_IME_PINYIN_USE_K9_MODE*/
3453 #endif
3454 
3455 /** 1: Enable file explorer.
3456  *  - Requires: lv_table */
3457 #ifndef LV_USE_FILE_EXPLORER
3458     #ifdef CONFIG_LV_USE_FILE_EXPLORER
3459         #define LV_USE_FILE_EXPLORER CONFIG_LV_USE_FILE_EXPLORER
3460     #else
3461         #define LV_USE_FILE_EXPLORER                     0
3462     #endif
3463 #endif
3464 #if LV_USE_FILE_EXPLORER
3465     /** Maximum length of path */
3466     #ifndef LV_FILE_EXPLORER_PATH_MAX_LEN
3467         #ifdef CONFIG_LV_FILE_EXPLORER_PATH_MAX_LEN
3468             #define LV_FILE_EXPLORER_PATH_MAX_LEN CONFIG_LV_FILE_EXPLORER_PATH_MAX_LEN
3469         #else
3470             #define LV_FILE_EXPLORER_PATH_MAX_LEN        (128)
3471         #endif
3472     #endif
3473     /** Quick access bar, 1:use, 0:do not use.
3474      *  - Requires: lv_list */
3475     #ifndef LV_FILE_EXPLORER_QUICK_ACCESS
3476         #ifdef LV_KCONFIG_PRESENT
3477             #ifdef CONFIG_LV_FILE_EXPLORER_QUICK_ACCESS
3478                 #define LV_FILE_EXPLORER_QUICK_ACCESS CONFIG_LV_FILE_EXPLORER_QUICK_ACCESS
3479             #else
3480                 #define LV_FILE_EXPLORER_QUICK_ACCESS 0
3481             #endif
3482         #else
3483             #define LV_FILE_EXPLORER_QUICK_ACCESS        1
3484         #endif
3485     #endif
3486 #endif
3487 
3488 /** 1: Enable freetype font manager
3489  *  - Requires: LV_USE_FREETYPE */
3490 #ifndef LV_USE_FONT_MANAGER
3491     #ifdef CONFIG_LV_USE_FONT_MANAGER
3492         #define LV_USE_FONT_MANAGER CONFIG_LV_USE_FONT_MANAGER
3493     #else
3494         #define LV_USE_FONT_MANAGER                     0
3495     #endif
3496 #endif
3497 #if LV_USE_FONT_MANAGER
3498 
3499 /**Font manager name max length*/
3500 #ifndef LV_FONT_MANAGER_NAME_MAX_LEN
3501     #ifdef CONFIG_LV_FONT_MANAGER_NAME_MAX_LEN
3502         #define LV_FONT_MANAGER_NAME_MAX_LEN CONFIG_LV_FONT_MANAGER_NAME_MAX_LEN
3503     #else
3504         #define LV_FONT_MANAGER_NAME_MAX_LEN            32
3505     #endif
3506 #endif
3507 
3508 #endif
3509 
3510 /** Enable loading XML UIs runtime */
3511 #ifndef LV_USE_XML
3512     #ifdef CONFIG_LV_USE_XML
3513         #define LV_USE_XML CONFIG_LV_USE_XML
3514     #else
3515         #define LV_USE_XML	0
3516     #endif
3517 #endif
3518 
3519 /*==================
3520  * DEVICES
3521  *==================*/
3522 
3523 /** Use SDL to open window on PC and handle mouse and keyboard. */
3524 #ifndef LV_USE_SDL
3525     #ifdef CONFIG_LV_USE_SDL
3526         #define LV_USE_SDL CONFIG_LV_USE_SDL
3527     #else
3528         #define LV_USE_SDL              0
3529     #endif
3530 #endif
3531 #if LV_USE_SDL
3532     #ifndef LV_SDL_INCLUDE_PATH
3533         #ifdef CONFIG_LV_SDL_INCLUDE_PATH
3534             #define LV_SDL_INCLUDE_PATH CONFIG_LV_SDL_INCLUDE_PATH
3535         #else
3536             #define LV_SDL_INCLUDE_PATH     <SDL2/SDL.h>
3537         #endif
3538     #endif
3539     #ifndef LV_SDL_RENDER_MODE
3540         #ifdef CONFIG_LV_SDL_RENDER_MODE
3541             #define LV_SDL_RENDER_MODE CONFIG_LV_SDL_RENDER_MODE
3542         #else
3543             #define LV_SDL_RENDER_MODE      LV_DISPLAY_RENDER_MODE_DIRECT   /**< LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance */
3544         #endif
3545     #endif
3546     #ifndef LV_SDL_BUF_COUNT
3547         #ifdef LV_KCONFIG_PRESENT
3548             #ifdef CONFIG_LV_SDL_BUF_COUNT
3549                 #define LV_SDL_BUF_COUNT CONFIG_LV_SDL_BUF_COUNT
3550             #else
3551                 #define LV_SDL_BUF_COUNT 0
3552             #endif
3553         #else
3554             #define LV_SDL_BUF_COUNT        1    /**< 1 or 2 */
3555         #endif
3556     #endif
3557     #ifndef LV_SDL_ACCELERATED
3558         #ifdef LV_KCONFIG_PRESENT
3559             #ifdef CONFIG_LV_SDL_ACCELERATED
3560                 #define LV_SDL_ACCELERATED CONFIG_LV_SDL_ACCELERATED
3561             #else
3562                 #define LV_SDL_ACCELERATED 0
3563             #endif
3564         #else
3565             #define LV_SDL_ACCELERATED      1    /**< 1: Use hardware acceleration*/
3566         #endif
3567     #endif
3568     #ifndef LV_SDL_FULLSCREEN
3569         #ifdef CONFIG_LV_SDL_FULLSCREEN
3570             #define LV_SDL_FULLSCREEN CONFIG_LV_SDL_FULLSCREEN
3571         #else
3572             #define LV_SDL_FULLSCREEN       0    /**< 1: Make the window full screen by default */
3573         #endif
3574     #endif
3575     #ifndef LV_SDL_DIRECT_EXIT
3576         #ifdef LV_KCONFIG_PRESENT
3577             #ifdef CONFIG_LV_SDL_DIRECT_EXIT
3578                 #define LV_SDL_DIRECT_EXIT CONFIG_LV_SDL_DIRECT_EXIT
3579             #else
3580                 #define LV_SDL_DIRECT_EXIT 0
3581             #endif
3582         #else
3583             #define LV_SDL_DIRECT_EXIT      1    /**< 1: Exit the application when all SDL windows are closed */
3584         #endif
3585     #endif
3586     #ifndef LV_SDL_MOUSEWHEEL_MODE
3587         #ifdef CONFIG_LV_SDL_MOUSEWHEEL_MODE
3588             #define LV_SDL_MOUSEWHEEL_MODE CONFIG_LV_SDL_MOUSEWHEEL_MODE
3589         #else
3590             #define LV_SDL_MOUSEWHEEL_MODE  LV_SDL_MOUSEWHEEL_MODE_ENCODER  /*LV_SDL_MOUSEWHEEL_MODE_ENCODER/CROWN*/
3591         #endif
3592     #endif
3593 #endif
3594 
3595 /** Use X11 to open window on Linux desktop and handle mouse and keyboard */
3596 #ifndef LV_USE_X11
3597     #ifdef CONFIG_LV_USE_X11
3598         #define LV_USE_X11 CONFIG_LV_USE_X11
3599     #else
3600         #define LV_USE_X11              0
3601     #endif
3602 #endif
3603 #if LV_USE_X11
3604     #ifndef LV_X11_DIRECT_EXIT
3605         #ifdef LV_KCONFIG_PRESENT
3606             #ifdef CONFIG_LV_X11_DIRECT_EXIT
3607                 #define LV_X11_DIRECT_EXIT CONFIG_LV_X11_DIRECT_EXIT
3608             #else
3609                 #define LV_X11_DIRECT_EXIT 0
3610             #endif
3611         #else
3612             #define LV_X11_DIRECT_EXIT         1  /**< Exit application when all X11 windows have been closed */
3613         #endif
3614     #endif
3615     #ifndef LV_X11_DOUBLE_BUFFER
3616         #ifdef LV_KCONFIG_PRESENT
3617             #ifdef CONFIG_LV_X11_DOUBLE_BUFFER
3618                 #define LV_X11_DOUBLE_BUFFER CONFIG_LV_X11_DOUBLE_BUFFER
3619             #else
3620                 #define LV_X11_DOUBLE_BUFFER 0
3621             #endif
3622         #else
3623             #define LV_X11_DOUBLE_BUFFER       1  /**< Use double buffers for rendering */
3624         #endif
3625     #endif
3626     /* Select only 1 of the following render modes (LV_X11_RENDER_MODE_PARTIAL preferred!). */
3627     #ifndef LV_X11_RENDER_MODE_PARTIAL
3628         #ifdef LV_KCONFIG_PRESENT
3629             #ifdef CONFIG_LV_X11_RENDER_MODE_PARTIAL
3630                 #define LV_X11_RENDER_MODE_PARTIAL CONFIG_LV_X11_RENDER_MODE_PARTIAL
3631             #else
3632                 #define LV_X11_RENDER_MODE_PARTIAL 0
3633             #endif
3634         #else
3635             #define LV_X11_RENDER_MODE_PARTIAL 1  /**< Partial render mode (preferred) */
3636         #endif
3637     #endif
3638     #ifndef LV_X11_RENDER_MODE_DIRECT
3639         #ifdef CONFIG_LV_X11_RENDER_MODE_DIRECT
3640             #define LV_X11_RENDER_MODE_DIRECT CONFIG_LV_X11_RENDER_MODE_DIRECT
3641         #else
3642             #define LV_X11_RENDER_MODE_DIRECT  0  /**< Direct render mode */
3643         #endif
3644     #endif
3645     #ifndef LV_X11_RENDER_MODE_FULL
3646         #ifdef CONFIG_LV_X11_RENDER_MODE_FULL
3647             #define LV_X11_RENDER_MODE_FULL CONFIG_LV_X11_RENDER_MODE_FULL
3648         #else
3649             #define LV_X11_RENDER_MODE_FULL    0  /**< Full render mode */
3650         #endif
3651     #endif
3652 #endif
3653 
3654 /** Use Wayland to open a window and handle input on Linux or BSD desktops */
3655 #ifndef LV_USE_WAYLAND
3656     #ifdef CONFIG_LV_USE_WAYLAND
3657         #define LV_USE_WAYLAND CONFIG_LV_USE_WAYLAND
3658     #else
3659         #define LV_USE_WAYLAND          0
3660     #endif
3661 #endif
3662 #if LV_USE_WAYLAND
3663     #ifndef LV_WAYLAND_WINDOW_DECORATIONS
3664         #ifdef CONFIG_LV_WAYLAND_WINDOW_DECORATIONS
3665             #define LV_WAYLAND_WINDOW_DECORATIONS CONFIG_LV_WAYLAND_WINDOW_DECORATIONS
3666         #else
3667             #define LV_WAYLAND_WINDOW_DECORATIONS   0    /**< Draw client side window decorations only necessary on Mutter/GNOME */
3668         #endif
3669     #endif
3670     #ifndef LV_WAYLAND_WL_SHELL
3671         #ifdef CONFIG_LV_WAYLAND_WL_SHELL
3672             #define LV_WAYLAND_WL_SHELL CONFIG_LV_WAYLAND_WL_SHELL
3673         #else
3674             #define LV_WAYLAND_WL_SHELL             0    /**< Use the legacy wl_shell protocol instead of the default XDG shell */
3675         #endif
3676     #endif
3677 #endif
3678 
3679 /** Driver for /dev/fb */
3680 #ifndef LV_USE_LINUX_FBDEV
3681     #ifdef CONFIG_LV_USE_LINUX_FBDEV
3682         #define LV_USE_LINUX_FBDEV CONFIG_LV_USE_LINUX_FBDEV
3683     #else
3684         #define LV_USE_LINUX_FBDEV      0
3685     #endif
3686 #endif
3687 #if LV_USE_LINUX_FBDEV
3688     #ifndef LV_LINUX_FBDEV_BSD
3689         #ifdef CONFIG_LV_LINUX_FBDEV_BSD
3690             #define LV_LINUX_FBDEV_BSD CONFIG_LV_LINUX_FBDEV_BSD
3691         #else
3692             #define LV_LINUX_FBDEV_BSD           0
3693         #endif
3694     #endif
3695     #ifndef LV_LINUX_FBDEV_RENDER_MODE
3696         #ifdef CONFIG_LV_LINUX_FBDEV_RENDER_MODE
3697             #define LV_LINUX_FBDEV_RENDER_MODE CONFIG_LV_LINUX_FBDEV_RENDER_MODE
3698         #else
3699             #define LV_LINUX_FBDEV_RENDER_MODE   LV_DISPLAY_RENDER_MODE_PARTIAL
3700         #endif
3701     #endif
3702     #ifndef LV_LINUX_FBDEV_BUFFER_COUNT
3703         #ifdef CONFIG_LV_LINUX_FBDEV_BUFFER_COUNT
3704             #define LV_LINUX_FBDEV_BUFFER_COUNT CONFIG_LV_LINUX_FBDEV_BUFFER_COUNT
3705         #else
3706             #define LV_LINUX_FBDEV_BUFFER_COUNT  0
3707         #endif
3708     #endif
3709     #ifndef LV_LINUX_FBDEV_BUFFER_SIZE
3710         #ifdef CONFIG_LV_LINUX_FBDEV_BUFFER_SIZE
3711             #define LV_LINUX_FBDEV_BUFFER_SIZE CONFIG_LV_LINUX_FBDEV_BUFFER_SIZE
3712         #else
3713             #define LV_LINUX_FBDEV_BUFFER_SIZE   60
3714         #endif
3715     #endif
3716 #endif
3717 
3718 /** Use Nuttx to open window and handle touchscreen */
3719 #ifndef LV_USE_NUTTX
3720     #ifdef CONFIG_LV_USE_NUTTX
3721         #define LV_USE_NUTTX CONFIG_LV_USE_NUTTX
3722     #else
3723         #define LV_USE_NUTTX    0
3724     #endif
3725 #endif
3726 
3727 #if LV_USE_NUTTX
3728     #ifndef LV_USE_NUTTX_INDEPENDENT_IMAGE_HEAP
3729         #ifdef CONFIG_LV_USE_NUTTX_INDEPENDENT_IMAGE_HEAP
3730             #define LV_USE_NUTTX_INDEPENDENT_IMAGE_HEAP CONFIG_LV_USE_NUTTX_INDEPENDENT_IMAGE_HEAP
3731         #else
3732             #define LV_USE_NUTTX_INDEPENDENT_IMAGE_HEAP 0
3733         #endif
3734     #endif
3735 
3736     #ifndef LV_USE_NUTTX_LIBUV
3737         #ifdef CONFIG_LV_USE_NUTTX_LIBUV
3738             #define LV_USE_NUTTX_LIBUV CONFIG_LV_USE_NUTTX_LIBUV
3739         #else
3740             #define LV_USE_NUTTX_LIBUV    0
3741         #endif
3742     #endif
3743 
3744     /** Use Nuttx custom init API to open window and handle touchscreen */
3745     #ifndef LV_USE_NUTTX_CUSTOM_INIT
3746         #ifdef CONFIG_LV_USE_NUTTX_CUSTOM_INIT
3747             #define LV_USE_NUTTX_CUSTOM_INIT CONFIG_LV_USE_NUTTX_CUSTOM_INIT
3748         #else
3749             #define LV_USE_NUTTX_CUSTOM_INIT    0
3750         #endif
3751     #endif
3752 
3753     /** Driver for /dev/lcd */
3754     #ifndef LV_USE_NUTTX_LCD
3755         #ifdef CONFIG_LV_USE_NUTTX_LCD
3756             #define LV_USE_NUTTX_LCD CONFIG_LV_USE_NUTTX_LCD
3757         #else
3758             #define LV_USE_NUTTX_LCD      0
3759         #endif
3760     #endif
3761     #if LV_USE_NUTTX_LCD
3762         #ifndef LV_NUTTX_LCD_BUFFER_COUNT
3763             #ifdef CONFIG_LV_NUTTX_LCD_BUFFER_COUNT
3764                 #define LV_NUTTX_LCD_BUFFER_COUNT CONFIG_LV_NUTTX_LCD_BUFFER_COUNT
3765             #else
3766                 #define LV_NUTTX_LCD_BUFFER_COUNT    0
3767             #endif
3768         #endif
3769         #ifndef LV_NUTTX_LCD_BUFFER_SIZE
3770             #ifdef CONFIG_LV_NUTTX_LCD_BUFFER_SIZE
3771                 #define LV_NUTTX_LCD_BUFFER_SIZE CONFIG_LV_NUTTX_LCD_BUFFER_SIZE
3772             #else
3773                 #define LV_NUTTX_LCD_BUFFER_SIZE     60
3774             #endif
3775         #endif
3776     #endif
3777 
3778     /** Driver for /dev/input */
3779     #ifndef LV_USE_NUTTX_TOUCHSCREEN
3780         #ifdef CONFIG_LV_USE_NUTTX_TOUCHSCREEN
3781             #define LV_USE_NUTTX_TOUCHSCREEN CONFIG_LV_USE_NUTTX_TOUCHSCREEN
3782         #else
3783             #define LV_USE_NUTTX_TOUCHSCREEN    0
3784         #endif
3785     #endif
3786 
3787     /*Touchscreen cursor size in pixels(<=0: disable cursor)*/
3788     #ifndef LV_NUTTX_TOUCHSCREEN_CURSOR_SIZE
3789         #ifdef CONFIG_LV_NUTTX_TOUCHSCREEN_CURSOR_SIZE
3790             #define LV_NUTTX_TOUCHSCREEN_CURSOR_SIZE CONFIG_LV_NUTTX_TOUCHSCREEN_CURSOR_SIZE
3791         #else
3792             #define LV_NUTTX_TOUCHSCREEN_CURSOR_SIZE    0
3793         #endif
3794     #endif
3795 #endif
3796 
3797 /** Driver for /dev/dri/card */
3798 #ifndef LV_USE_LINUX_DRM
3799     #ifdef CONFIG_LV_USE_LINUX_DRM
3800         #define LV_USE_LINUX_DRM CONFIG_LV_USE_LINUX_DRM
3801     #else
3802         #define LV_USE_LINUX_DRM        0
3803     #endif
3804 #endif
3805 
3806 /** Interface for TFT_eSPI */
3807 #ifndef LV_USE_TFT_ESPI
3808     #ifdef CONFIG_LV_USE_TFT_ESPI
3809         #define LV_USE_TFT_ESPI CONFIG_LV_USE_TFT_ESPI
3810     #else
3811         #define LV_USE_TFT_ESPI         0
3812     #endif
3813 #endif
3814 
3815 /** Driver for evdev input devices */
3816 #ifndef LV_USE_EVDEV
3817     #ifdef CONFIG_LV_USE_EVDEV
3818         #define LV_USE_EVDEV CONFIG_LV_USE_EVDEV
3819     #else
3820         #define LV_USE_EVDEV    0
3821     #endif
3822 #endif
3823 
3824 /** Driver for libinput input devices */
3825 #ifndef LV_USE_LIBINPUT
3826     #ifdef CONFIG_LV_USE_LIBINPUT
3827         #define LV_USE_LIBINPUT CONFIG_LV_USE_LIBINPUT
3828     #else
3829         #define LV_USE_LIBINPUT    0
3830     #endif
3831 #endif
3832 
3833 #if LV_USE_LIBINPUT
3834     #ifndef LV_LIBINPUT_BSD
3835         #ifdef CONFIG_LV_LIBINPUT_BSD
3836             #define LV_LIBINPUT_BSD CONFIG_LV_LIBINPUT_BSD
3837         #else
3838             #define LV_LIBINPUT_BSD    0
3839         #endif
3840     #endif
3841 
3842     /** Full keyboard support */
3843     #ifndef LV_LIBINPUT_XKB
3844         #ifdef CONFIG_LV_LIBINPUT_XKB
3845             #define LV_LIBINPUT_XKB CONFIG_LV_LIBINPUT_XKB
3846         #else
3847             #define LV_LIBINPUT_XKB             0
3848         #endif
3849     #endif
3850     #if LV_LIBINPUT_XKB
3851         /** "setxkbmap -query" can help find the right values for your keyboard */
3852         #ifndef LV_LIBINPUT_XKB_KEY_MAP
3853             #ifdef CONFIG_LV_LIBINPUT_XKB_KEY_MAP
3854                 #define LV_LIBINPUT_XKB_KEY_MAP CONFIG_LV_LIBINPUT_XKB_KEY_MAP
3855             #else
3856                 #define LV_LIBINPUT_XKB_KEY_MAP { .rules = NULL, .model = "pc101", .layout = "us", .variant = NULL, .options = NULL }
3857             #endif
3858         #endif
3859     #endif
3860 #endif
3861 
3862 /* Drivers for LCD devices connected via SPI/parallel port */
3863 #ifndef LV_USE_ST7735
3864     #ifdef CONFIG_LV_USE_ST7735
3865         #define LV_USE_ST7735 CONFIG_LV_USE_ST7735
3866     #else
3867         #define LV_USE_ST7735        0
3868     #endif
3869 #endif
3870 #ifndef LV_USE_ST7789
3871     #ifdef CONFIG_LV_USE_ST7789
3872         #define LV_USE_ST7789 CONFIG_LV_USE_ST7789
3873     #else
3874         #define LV_USE_ST7789        0
3875     #endif
3876 #endif
3877 #ifndef LV_USE_ST7796
3878     #ifdef CONFIG_LV_USE_ST7796
3879         #define LV_USE_ST7796 CONFIG_LV_USE_ST7796
3880     #else
3881         #define LV_USE_ST7796        0
3882     #endif
3883 #endif
3884 #ifndef LV_USE_ILI9341
3885     #ifdef CONFIG_LV_USE_ILI9341
3886         #define LV_USE_ILI9341 CONFIG_LV_USE_ILI9341
3887     #else
3888         #define LV_USE_ILI9341       0
3889     #endif
3890 #endif
3891 
3892 #ifndef LV_USE_GENERIC_MIPI
3893     #ifdef CONFIG_LV_USE_GENERIC_MIPI
3894         #define LV_USE_GENERIC_MIPI CONFIG_LV_USE_GENERIC_MIPI
3895     #else
3896         #define LV_USE_GENERIC_MIPI (LV_USE_ST7735 | LV_USE_ST7789 | LV_USE_ST7796 | LV_USE_ILI9341)
3897     #endif
3898 #endif
3899 
3900 /** Driver for Renesas GLCD */
3901 #ifndef LV_USE_RENESAS_GLCDC
3902     #ifdef CONFIG_LV_USE_RENESAS_GLCDC
3903         #define LV_USE_RENESAS_GLCDC CONFIG_LV_USE_RENESAS_GLCDC
3904     #else
3905         #define LV_USE_RENESAS_GLCDC    0
3906     #endif
3907 #endif
3908 
3909 /** Driver for ST LTDC */
3910 #ifndef LV_USE_ST_LTDC
3911     #ifdef CONFIG_LV_USE_ST_LTDC
3912         #define LV_USE_ST_LTDC CONFIG_LV_USE_ST_LTDC
3913     #else
3914         #define LV_USE_ST_LTDC    0
3915     #endif
3916 #endif
3917 #if LV_USE_ST_LTDC
3918     /* Only used for partial. */
3919     #ifndef LV_ST_LTDC_USE_DMA2D_FLUSH
3920         #ifdef CONFIG_LV_ST_LTDC_USE_DMA2D_FLUSH
3921             #define LV_ST_LTDC_USE_DMA2D_FLUSH CONFIG_LV_ST_LTDC_USE_DMA2D_FLUSH
3922         #else
3923             #define LV_ST_LTDC_USE_DMA2D_FLUSH 0
3924         #endif
3925     #endif
3926 #endif
3927 
3928 /** LVGL Windows backend */
3929 #ifndef LV_USE_WINDOWS
3930     #ifdef CONFIG_LV_USE_WINDOWS
3931         #define LV_USE_WINDOWS CONFIG_LV_USE_WINDOWS
3932     #else
3933         #define LV_USE_WINDOWS    0
3934     #endif
3935 #endif
3936 
3937 /** LVGL UEFI backend */
3938 #ifndef LV_USE_UEFI
3939     #ifdef CONFIG_LV_USE_UEFI
3940         #define LV_USE_UEFI CONFIG_LV_USE_UEFI
3941     #else
3942         #define LV_USE_UEFI 0
3943     #endif
3944 #endif
3945 #if LV_USE_UEFI
3946     #ifndef LV_USE_UEFI_INCLUDE
3947         #ifdef CONFIG_LV_USE_UEFI_INCLUDE
3948             #define LV_USE_UEFI_INCLUDE CONFIG_LV_USE_UEFI_INCLUDE
3949         #else
3950             #define LV_USE_UEFI_INCLUDE "myefi.h"   /**< Header that hides the actual framework (EDK2, gnu-efi, ...) */
3951         #endif
3952     #endif
3953     #ifndef LV_UEFI_USE_MEMORY_SERVICES
3954         #ifdef CONFIG_LV_UEFI_USE_MEMORY_SERVICES
3955             #define LV_UEFI_USE_MEMORY_SERVICES CONFIG_LV_UEFI_USE_MEMORY_SERVICES
3956         #else
3957             #define LV_UEFI_USE_MEMORY_SERVICES 0   /**< Use the memory functions from the boot services table */
3958         #endif
3959     #endif
3960 #endif
3961 
3962 /** Use OpenGL to open window on PC and handle mouse and keyboard */
3963 #ifndef LV_USE_OPENGLES
3964     #ifdef CONFIG_LV_USE_OPENGLES
3965         #define LV_USE_OPENGLES CONFIG_LV_USE_OPENGLES
3966     #else
3967         #define LV_USE_OPENGLES   0
3968     #endif
3969 #endif
3970 #if LV_USE_OPENGLES
3971     #ifndef LV_USE_OPENGLES_DEBUG
3972         #ifdef LV_KCONFIG_PRESENT
3973             #ifdef CONFIG_LV_USE_OPENGLES_DEBUG
3974                 #define LV_USE_OPENGLES_DEBUG CONFIG_LV_USE_OPENGLES_DEBUG
3975             #else
3976                 #define LV_USE_OPENGLES_DEBUG 0
3977             #endif
3978         #else
3979             #define LV_USE_OPENGLES_DEBUG        1    /**< Enable or disable debug for opengles */
3980         #endif
3981     #endif
3982 #endif
3983 
3984 /** QNX Screen display and input drivers */
3985 #ifndef LV_USE_QNX
3986     #ifdef CONFIG_LV_USE_QNX
3987         #define LV_USE_QNX CONFIG_LV_USE_QNX
3988     #else
3989         #define LV_USE_QNX              0
3990     #endif
3991 #endif
3992 #if LV_USE_QNX
3993     #ifndef LV_QNX_BUF_COUNT
3994         #ifdef LV_KCONFIG_PRESENT
3995             #ifdef CONFIG_LV_QNX_BUF_COUNT
3996                 #define LV_QNX_BUF_COUNT CONFIG_LV_QNX_BUF_COUNT
3997             #else
3998                 #define LV_QNX_BUF_COUNT 0
3999             #endif
4000         #else
4001             #define LV_QNX_BUF_COUNT        1    /**< 1 or 2 */
4002         #endif
4003     #endif
4004 #endif
4005 
4006 /*==================
4007 * EXAMPLES
4008 *==================*/
4009 
4010 /** Enable examples to be built with the library. */
4011 #ifndef LV_BUILD_EXAMPLES
4012     #ifdef LV_KCONFIG_PRESENT
4013         #ifdef CONFIG_LV_BUILD_EXAMPLES
4014             #define LV_BUILD_EXAMPLES CONFIG_LV_BUILD_EXAMPLES
4015         #else
4016             #define LV_BUILD_EXAMPLES 0
4017         #endif
4018     #else
4019         #define LV_BUILD_EXAMPLES 1
4020     #endif
4021 #endif
4022 
4023 /*===================
4024  * DEMO USAGE
4025  ====================*/
4026 
4027 /** Show some widgets. This might be required to increase `LV_MEM_SIZE`. */
4028 #ifndef LV_USE_DEMO_WIDGETS
4029     #ifdef CONFIG_LV_USE_DEMO_WIDGETS
4030         #define LV_USE_DEMO_WIDGETS CONFIG_LV_USE_DEMO_WIDGETS
4031     #else
4032         #define LV_USE_DEMO_WIDGETS 0
4033     #endif
4034 #endif
4035 
4036 /** Demonstrate usage of encoder and keyboard. */
4037 #ifndef LV_USE_DEMO_KEYPAD_AND_ENCODER
4038     #ifdef CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER
4039         #define LV_USE_DEMO_KEYPAD_AND_ENCODER CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER
4040     #else
4041         #define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
4042     #endif
4043 #endif
4044 
4045 /** Benchmark your system */
4046 #ifndef LV_USE_DEMO_BENCHMARK
4047     #ifdef CONFIG_LV_USE_DEMO_BENCHMARK
4048         #define LV_USE_DEMO_BENCHMARK CONFIG_LV_USE_DEMO_BENCHMARK
4049     #else
4050         #define LV_USE_DEMO_BENCHMARK 0
4051     #endif
4052 #endif
4053 
4054 /** Render test for each primitive.
4055  *  - Requires at least 480x272 display. */
4056 #ifndef LV_USE_DEMO_RENDER
4057     #ifdef CONFIG_LV_USE_DEMO_RENDER
4058         #define LV_USE_DEMO_RENDER CONFIG_LV_USE_DEMO_RENDER
4059     #else
4060         #define LV_USE_DEMO_RENDER 0
4061     #endif
4062 #endif
4063 
4064 /** Stress test for LVGL */
4065 #ifndef LV_USE_DEMO_STRESS
4066     #ifdef CONFIG_LV_USE_DEMO_STRESS
4067         #define LV_USE_DEMO_STRESS CONFIG_LV_USE_DEMO_STRESS
4068     #else
4069         #define LV_USE_DEMO_STRESS 0
4070     #endif
4071 #endif
4072 
4073 /** Music player demo */
4074 #ifndef LV_USE_DEMO_MUSIC
4075     #ifdef CONFIG_LV_USE_DEMO_MUSIC
4076         #define LV_USE_DEMO_MUSIC CONFIG_LV_USE_DEMO_MUSIC
4077     #else
4078         #define LV_USE_DEMO_MUSIC 0
4079     #endif
4080 #endif
4081 #if LV_USE_DEMO_MUSIC
4082     #ifndef LV_DEMO_MUSIC_SQUARE
4083         #ifdef CONFIG_LV_DEMO_MUSIC_SQUARE
4084             #define LV_DEMO_MUSIC_SQUARE CONFIG_LV_DEMO_MUSIC_SQUARE
4085         #else
4086             #define LV_DEMO_MUSIC_SQUARE    0
4087         #endif
4088     #endif
4089     #ifndef LV_DEMO_MUSIC_LANDSCAPE
4090         #ifdef CONFIG_LV_DEMO_MUSIC_LANDSCAPE
4091             #define LV_DEMO_MUSIC_LANDSCAPE CONFIG_LV_DEMO_MUSIC_LANDSCAPE
4092         #else
4093             #define LV_DEMO_MUSIC_LANDSCAPE 0
4094         #endif
4095     #endif
4096     #ifndef LV_DEMO_MUSIC_ROUND
4097         #ifdef CONFIG_LV_DEMO_MUSIC_ROUND
4098             #define LV_DEMO_MUSIC_ROUND CONFIG_LV_DEMO_MUSIC_ROUND
4099         #else
4100             #define LV_DEMO_MUSIC_ROUND     0
4101         #endif
4102     #endif
4103     #ifndef LV_DEMO_MUSIC_LARGE
4104         #ifdef CONFIG_LV_DEMO_MUSIC_LARGE
4105             #define LV_DEMO_MUSIC_LARGE CONFIG_LV_DEMO_MUSIC_LARGE
4106         #else
4107             #define LV_DEMO_MUSIC_LARGE     0
4108         #endif
4109     #endif
4110     #ifndef LV_DEMO_MUSIC_AUTO_PLAY
4111         #ifdef CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
4112             #define LV_DEMO_MUSIC_AUTO_PLAY CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
4113         #else
4114             #define LV_DEMO_MUSIC_AUTO_PLAY 0
4115         #endif
4116     #endif
4117 #endif
4118 
4119 /** Flex layout demo */
4120 #ifndef LV_USE_DEMO_FLEX_LAYOUT
4121     #ifdef CONFIG_LV_USE_DEMO_FLEX_LAYOUT
4122         #define LV_USE_DEMO_FLEX_LAYOUT CONFIG_LV_USE_DEMO_FLEX_LAYOUT
4123     #else
4124         #define LV_USE_DEMO_FLEX_LAYOUT     0
4125     #endif
4126 #endif
4127 
4128 /** Smart-phone like multi-language demo */
4129 #ifndef LV_USE_DEMO_MULTILANG
4130     #ifdef CONFIG_LV_USE_DEMO_MULTILANG
4131         #define LV_USE_DEMO_MULTILANG CONFIG_LV_USE_DEMO_MULTILANG
4132     #else
4133         #define LV_USE_DEMO_MULTILANG       0
4134     #endif
4135 #endif
4136 
4137 /** Widget transformation demo */
4138 #ifndef LV_USE_DEMO_TRANSFORM
4139     #ifdef CONFIG_LV_USE_DEMO_TRANSFORM
4140         #define LV_USE_DEMO_TRANSFORM CONFIG_LV_USE_DEMO_TRANSFORM
4141     #else
4142         #define LV_USE_DEMO_TRANSFORM       0
4143     #endif
4144 #endif
4145 
4146 /** Demonstrate scroll settings */
4147 #ifndef LV_USE_DEMO_SCROLL
4148     #ifdef CONFIG_LV_USE_DEMO_SCROLL
4149         #define LV_USE_DEMO_SCROLL CONFIG_LV_USE_DEMO_SCROLL
4150     #else
4151         #define LV_USE_DEMO_SCROLL          0
4152     #endif
4153 #endif
4154 
4155 /** Vector graphic demo */
4156 #ifndef LV_USE_DEMO_VECTOR_GRAPHIC
4157     #ifdef CONFIG_LV_USE_DEMO_VECTOR_GRAPHIC
4158         #define LV_USE_DEMO_VECTOR_GRAPHIC CONFIG_LV_USE_DEMO_VECTOR_GRAPHIC
4159     #else
4160         #define LV_USE_DEMO_VECTOR_GRAPHIC  0
4161     #endif
4162 #endif
4163 
4164 /*E-bike demo with Lottie animations (if LV_USE_LOTTIE is enabled)*/
4165 #ifndef LV_USE_DEMO_EBIKE
4166     #ifdef CONFIG_LV_USE_DEMO_EBIKE
4167         #define LV_USE_DEMO_EBIKE CONFIG_LV_USE_DEMO_EBIKE
4168     #else
4169         #define LV_USE_DEMO_EBIKE			0
4170     #endif
4171 #endif
4172 #if LV_USE_DEMO_EBIKE
4173 	#ifndef LV_DEMO_EBIKE_PORTRAIT
4174 	    #ifdef CONFIG_LV_DEMO_EBIKE_PORTRAIT
4175 	        #define LV_DEMO_EBIKE_PORTRAIT CONFIG_LV_DEMO_EBIKE_PORTRAIT
4176 	    #else
4177 	        #define LV_DEMO_EBIKE_PORTRAIT  0    /*0: for 480x270..480x320, 1: for 480x800..720x1280*/
4178 	    #endif
4179 	#endif
4180 #endif
4181 
4182 /** High-resolution demo */
4183 #ifndef LV_USE_DEMO_HIGH_RES
4184     #ifdef CONFIG_LV_USE_DEMO_HIGH_RES
4185         #define LV_USE_DEMO_HIGH_RES CONFIG_LV_USE_DEMO_HIGH_RES
4186     #else
4187         #define LV_USE_DEMO_HIGH_RES        0
4188     #endif
4189 #endif
4190 
4191 /* Smart watch demo */
4192 #ifndef LV_USE_DEMO_SMARTWATCH
4193     #ifdef CONFIG_LV_USE_DEMO_SMARTWATCH
4194         #define LV_USE_DEMO_SMARTWATCH CONFIG_LV_USE_DEMO_SMARTWATCH
4195     #else
4196         #define LV_USE_DEMO_SMARTWATCH      0
4197     #endif
4198 #endif
4199 
4200 
4201 
4202 /*----------------------------------
4203  * End of parsing lv_conf_template.h
4204  -----------------------------------*/
4205 
4206 /*Fix inconsistent name*/
4207 #define LV_USE_ANIMIMAGE LV_USE_ANIMIMG
4208 
4209 #ifndef __ASSEMBLY__
4210 LV_EXPORT_CONST_INT(LV_DPI_DEF);
4211 LV_EXPORT_CONST_INT(LV_DRAW_BUF_STRIDE_ALIGN);
4212 LV_EXPORT_CONST_INT(LV_DRAW_BUF_ALIGN);
4213 #endif
4214 
4215 #undef LV_KCONFIG_PRESENT
4216 
4217 /* Set some defines if a dependency is disabled. */
4218 #if LV_USE_LOG == 0
4219     #define LV_LOG_LEVEL            LV_LOG_LEVEL_NONE
4220     #define LV_LOG_TRACE_MEM        0
4221     #define LV_LOG_TRACE_TIMER      0
4222     #define LV_LOG_TRACE_INDEV      0
4223     #define LV_LOG_TRACE_DISP_REFR  0
4224     #define LV_LOG_TRACE_EVENT      0
4225     #define LV_LOG_TRACE_OBJ_CREATE 0
4226     #define LV_LOG_TRACE_LAYOUT     0
4227     #define LV_LOG_TRACE_ANIM       0
4228 #endif  /*LV_USE_LOG*/
4229 
4230 #if LV_USE_SYSMON == 0
4231     #define LV_USE_PERF_MONITOR 0
4232     #define LV_USE_MEM_MONITOR 0
4233 #endif /*LV_USE_SYSMON*/
4234 
4235 #ifndef LV_USE_LZ4
4236     #define LV_USE_LZ4  (LV_USE_LZ4_INTERNAL || LV_USE_LZ4_EXTERNAL)
4237 #endif
4238 
4239 #ifndef LV_USE_THORVG
4240     #define LV_USE_THORVG  (LV_USE_THORVG_INTERNAL || LV_USE_THORVG_EXTERNAL)
4241 #endif
4242 
4243 #if LV_USE_OS
4244     #if (LV_USE_FREETYPE || LV_USE_THORVG) && LV_DRAW_THREAD_STACK_SIZE < (32 * 1024)
4245         #warning "Increase LV_DRAW_THREAD_STACK_SIZE to at least 32KB for FreeType or ThorVG."
4246     #endif
4247 
4248     #if defined(LV_DRAW_THREAD_STACKSIZE) && !defined(LV_DRAW_THREAD_STACK_SIZE)
4249         #warning "LV_DRAW_THREAD_STACKSIZE was renamed to LV_DRAW_THREAD_STACK_SIZE. Please update lv_conf.h or run menuconfig again."
4250         #define LV_DRAW_THREAD_STACK_SIZE LV_DRAW_THREAD_STACKSIZE
4251     #endif
4252 #endif
4253 
4254 /*Allow only upper case letters and '/'  ('/' is a special case for backward compatibility)*/
4255 #define LV_FS_IS_VALID_LETTER(l) ((l) == '/' || ((l) >= 'A' && (l) <= 'Z'))
4256 
4257 /* If running without lv_conf.h, add typedefs with default value. */
4258 #ifdef LV_CONF_SKIP
4259     #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)    /*Disable warnings for Visual Studio*/
4260         #define _CRT_SECURE_NO_WARNINGS
4261     #endif
4262 #endif  /*defined(LV_CONF_SKIP)*/
4263 
4264 #endif  /*LV_CONF_INTERNAL_H*/
4265