-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlv_conf_internal.h
3369 lines (3111 loc) · 100 KB
/
lv_conf_internal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* GENERATED FILE, DO NOT EDIT IT!
* @file lv_conf_internal.h
* Make sure all the defines of lv_conf.h have a default value
**/
#ifndef LV_CONF_INTERNAL_H
#define LV_CONF_INTERNAL_H
/* clang-format off */
/*Config options*/
#define LV_OS_NONE 0
#define LV_OS_PTHREAD 1
#define LV_OS_FREERTOS 2
#define LV_OS_CMSIS_RTOS2 3
#define LV_OS_RTTHREAD 4
#define LV_OS_WINDOWS 5
#define LV_OS_CUSTOM 255
#define LV_STDLIB_BUILTIN 0
#define LV_STDLIB_CLIB 1
#define LV_STDLIB_MICROPYTHON 2
#define LV_STDLIB_RTTHREAD 3
#define LV_STDLIB_CUSTOM 255
#define LV_DRAW_SW_ASM_NONE 0
#define LV_DRAW_SW_ASM_NEON 1
#define LV_DRAW_SW_ASM_HELIUM 2
#define LV_DRAW_SW_ASM_CUSTOM 255
/* Handle special Kconfig options */
#ifndef LV_KCONFIG_IGNORE
#include "lv_conf_kconfig.h"
#ifdef CONFIG_LV_CONF_SKIP
#define LV_CONF_SKIP
#endif
#endif
/*If "lv_conf.h" is available from here try to use it later.*/
#ifdef __has_include
#if __has_include("lv_conf.h")
#ifndef LV_CONF_INCLUDE_SIMPLE
#define LV_CONF_INCLUDE_SIMPLE
#endif
#endif
#endif
/*If lv_conf.h is not skipped include it*/
#ifndef LV_CONF_SKIP
#ifdef LV_CONF_PATH /*If there is a path defined for lv_conf.h use it*/
#define __LV_TO_STR_AUX(x) #x
#define __LV_TO_STR(x) __LV_TO_STR_AUX(x)
#include __LV_TO_STR(LV_CONF_PATH)
#undef __LV_TO_STR_AUX
#undef __LV_TO_STR
#elif defined(LV_CONF_INCLUDE_SIMPLE) /*Or simply include lv_conf.h is enabled*/
#include "lv_conf.h"
#else
#include "../../lv_conf.h" /*Else assume lv_conf.h is next to the lvgl folder*/
#endif
#if !defined(LV_CONF_H) && !defined(LV_CONF_SUPPRESS_DEFINE_CHECK)
/* #include will sometimes silently fail when __has_include is used */
/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80753 */
#pragma message("Possible failure to include lv_conf.h, please read the comment in this file if you get errors")
#endif
#endif
#ifdef CONFIG_LV_COLOR_DEPTH
#define _LV_KCONFIG_PRESENT
#endif
/*----------------------------------
* Start parsing lv_conf_template.h
-----------------------------------*/
/*If you need to include anything here, do it inside the `__ASSEMBLY__` guard */
#if 0 && defined(__ASSEMBLY__)
#include "my_include.h"
#endif
/*====================
COLOR SETTINGS
*====================*/
/*Color depth: 8 (A8), 16 (RGB565), 24 (RGB888), 32 (XRGB8888)*/
#ifndef LV_COLOR_DEPTH
#ifdef CONFIG_LV_COLOR_DEPTH
#define LV_COLOR_DEPTH CONFIG_LV_COLOR_DEPTH
#else
#define LV_COLOR_DEPTH 16
#endif
#endif
/*=========================
STDLIB WRAPPER SETTINGS
*=========================*/
/* Possible values
* - LV_STDLIB_BUILTIN: LVGL's built in implementation
* - LV_STDLIB_CLIB: Standard C functions, like malloc, strlen, etc
* - LV_STDLIB_MICROPYTHON: MicroPython implementation
* - LV_STDLIB_RTTHREAD: RT-Thread implementation
* - LV_STDLIB_CUSTOM: Implement the functions externally
*/
#ifndef LV_USE_STDLIB_MALLOC
#ifdef CONFIG_LV_USE_STDLIB_MALLOC
#define LV_USE_STDLIB_MALLOC CONFIG_LV_USE_STDLIB_MALLOC
#else
#define LV_USE_STDLIB_MALLOC LV_STDLIB_BUILTIN
#endif
#endif
#ifndef LV_USE_STDLIB_STRING
#ifdef CONFIG_LV_USE_STDLIB_STRING
#define LV_USE_STDLIB_STRING CONFIG_LV_USE_STDLIB_STRING
#else
#define LV_USE_STDLIB_STRING LV_STDLIB_BUILTIN
#endif
#endif
#ifndef LV_USE_STDLIB_SPRINTF
#ifdef CONFIG_LV_USE_STDLIB_SPRINTF
#define LV_USE_STDLIB_SPRINTF CONFIG_LV_USE_STDLIB_SPRINTF
#else
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_BUILTIN
#endif
#endif
#ifndef LV_STDINT_INCLUDE
#ifdef CONFIG_LV_STDINT_INCLUDE
#define LV_STDINT_INCLUDE CONFIG_LV_STDINT_INCLUDE
#else
#define LV_STDINT_INCLUDE <stdint.h>
#endif
#endif
#ifndef LV_STDDEF_INCLUDE
#ifdef CONFIG_LV_STDDEF_INCLUDE
#define LV_STDDEF_INCLUDE CONFIG_LV_STDDEF_INCLUDE
#else
#define LV_STDDEF_INCLUDE <stddef.h>
#endif
#endif
#ifndef LV_STDBOOL_INCLUDE
#ifdef CONFIG_LV_STDBOOL_INCLUDE
#define LV_STDBOOL_INCLUDE CONFIG_LV_STDBOOL_INCLUDE
#else
#define LV_STDBOOL_INCLUDE <stdbool.h>
#endif
#endif
#ifndef LV_INTTYPES_INCLUDE
#ifdef CONFIG_LV_INTTYPES_INCLUDE
#define LV_INTTYPES_INCLUDE CONFIG_LV_INTTYPES_INCLUDE
#else
#define LV_INTTYPES_INCLUDE <inttypes.h>
#endif
#endif
#ifndef LV_LIMITS_INCLUDE
#ifdef CONFIG_LV_LIMITS_INCLUDE
#define LV_LIMITS_INCLUDE CONFIG_LV_LIMITS_INCLUDE
#else
#define LV_LIMITS_INCLUDE <limits.h>
#endif
#endif
#ifndef LV_STDARG_INCLUDE
#ifdef CONFIG_LV_STDARG_INCLUDE
#define LV_STDARG_INCLUDE CONFIG_LV_STDARG_INCLUDE
#else
#define LV_STDARG_INCLUDE <stdarg.h>
#endif
#endif
#if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
/*Size of the memory available for `lv_malloc()` in bytes (>= 2kB)*/
#ifndef LV_MEM_SIZE
#ifdef CONFIG_LV_MEM_SIZE
#define LV_MEM_SIZE CONFIG_LV_MEM_SIZE
#else
#define LV_MEM_SIZE (64 * 1024U) /*[bytes]*/
#endif
#endif
/*Size of the memory expand for `lv_malloc()` in bytes*/
#ifndef LV_MEM_POOL_EXPAND_SIZE
#ifdef CONFIG_LV_MEM_POOL_EXPAND_SIZE
#define LV_MEM_POOL_EXPAND_SIZE CONFIG_LV_MEM_POOL_EXPAND_SIZE
#else
#define LV_MEM_POOL_EXPAND_SIZE 0
#endif
#endif
/*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
#ifndef LV_MEM_ADR
#ifdef CONFIG_LV_MEM_ADR
#define LV_MEM_ADR CONFIG_LV_MEM_ADR
#else
#define LV_MEM_ADR 0 /*0: unused*/
#endif
#endif
/*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
#if LV_MEM_ADR == 0
#ifndef LV_MEM_POOL_INCLUDE
#ifdef CONFIG_LV_MEM_POOL_INCLUDE
#define LV_MEM_POOL_INCLUDE CONFIG_LV_MEM_POOL_INCLUDE
#else
#undef LV_MEM_POOL_INCLUDE
#endif
#endif
#ifndef LV_MEM_POOL_ALLOC
#ifdef CONFIG_LV_MEM_POOL_ALLOC
#define LV_MEM_POOL_ALLOC CONFIG_LV_MEM_POOL_ALLOC
#else
#undef LV_MEM_POOL_ALLOC
#endif
#endif
#endif
#endif /*LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN*/
/*====================
HAL SETTINGS
*====================*/
/*Default display refresh, input device read and animation step period.*/
#ifndef LV_DEF_REFR_PERIOD
#ifdef CONFIG_LV_DEF_REFR_PERIOD
#define LV_DEF_REFR_PERIOD CONFIG_LV_DEF_REFR_PERIOD
#else
#define LV_DEF_REFR_PERIOD 33 /*[ms]*/
#endif
#endif
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
*(Not so important, you can adjust it to modify default sizes and spaces)*/
#ifndef LV_DPI_DEF
#ifdef CONFIG_LV_DPI_DEF
#define LV_DPI_DEF CONFIG_LV_DPI_DEF
#else
#define LV_DPI_DEF 130 /*[px/inch]*/
#endif
#endif
/*=================
* OPERATING SYSTEM
*=================*/
/*Select an operating system to use. Possible options:
* - LV_OS_NONE
* - LV_OS_PTHREAD
* - LV_OS_FREERTOS
* - LV_OS_CMSIS_RTOS2
* - LV_OS_RTTHREAD
* - LV_OS_WINDOWS
* - LV_OS_CUSTOM */
#ifndef LV_USE_OS
#ifdef CONFIG_LV_USE_OS
#define LV_USE_OS CONFIG_LV_USE_OS
#else
#define LV_USE_OS LV_OS_NONE
#endif
#endif
#if LV_USE_OS == LV_OS_CUSTOM
#ifndef LV_OS_CUSTOM_INCLUDE
#ifdef CONFIG_LV_OS_CUSTOM_INCLUDE
#define LV_OS_CUSTOM_INCLUDE CONFIG_LV_OS_CUSTOM_INCLUDE
#else
#define LV_OS_CUSTOM_INCLUDE <stdint.h>
#endif
#endif
#endif
/*========================
* RENDERING CONFIGURATION
*========================*/
/*Align the stride of all layers and images to this bytes*/
#ifndef LV_DRAW_BUF_STRIDE_ALIGN
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_DRAW_BUF_STRIDE_ALIGN
#define LV_DRAW_BUF_STRIDE_ALIGN CONFIG_LV_DRAW_BUF_STRIDE_ALIGN
#else
#define LV_DRAW_BUF_STRIDE_ALIGN 0
#endif
#else
#define LV_DRAW_BUF_STRIDE_ALIGN 1
#endif
#endif
/*Align the start address of draw_buf addresses to this bytes*/
#ifndef LV_DRAW_BUF_ALIGN
#ifdef CONFIG_LV_DRAW_BUF_ALIGN
#define LV_DRAW_BUF_ALIGN CONFIG_LV_DRAW_BUF_ALIGN
#else
#define LV_DRAW_BUF_ALIGN 4
#endif
#endif
/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
* and can't be drawn in chunks. */
/*The target buffer size for simple layer chunks.*/
#ifndef LV_DRAW_LAYER_SIMPLE_BUF_SIZE
#ifdef CONFIG_LV_DRAW_LAYER_SIMPLE_BUF_SIZE
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE CONFIG_LV_DRAW_LAYER_SIMPLE_BUF_SIZE
#else
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
#endif
#endif
/* The stack size of the drawing thread.
* NOTE: If FreeType or ThorVG is enabled, it is recommended to set it to 32KB or more.
*/
#ifndef LV_DRAW_THREAD_STACK_SIZE
#ifdef CONFIG_LV_DRAW_THREAD_STACK_SIZE
#define LV_DRAW_THREAD_STACK_SIZE CONFIG_LV_DRAW_THREAD_STACK_SIZE
#else
#define LV_DRAW_THREAD_STACK_SIZE (8 * 1024) /*[bytes]*/
#endif
#endif
#ifndef LV_USE_DRAW_SW
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_USE_DRAW_SW
#define LV_USE_DRAW_SW CONFIG_LV_USE_DRAW_SW
#else
#define LV_USE_DRAW_SW 0
#endif
#else
#define LV_USE_DRAW_SW 1
#endif
#endif
#if LV_USE_DRAW_SW == 1
/* Set the number of draw unit.
* > 1 requires an operating system enabled in `LV_USE_OS`
* > 1 means multiply threads will render the screen in parallel */
#ifndef LV_DRAW_SW_DRAW_UNIT_CNT
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_DRAW_SW_DRAW_UNIT_CNT
#define LV_DRAW_SW_DRAW_UNIT_CNT CONFIG_LV_DRAW_SW_DRAW_UNIT_CNT
#else
#define LV_DRAW_SW_DRAW_UNIT_CNT 0
#endif
#else
#define LV_DRAW_SW_DRAW_UNIT_CNT 1
#endif
#endif
/* Use Arm-2D to accelerate the sw render */
#ifndef LV_USE_DRAW_ARM2D_SYNC
#ifdef CONFIG_LV_USE_DRAW_ARM2D_SYNC
#define LV_USE_DRAW_ARM2D_SYNC CONFIG_LV_USE_DRAW_ARM2D_SYNC
#else
#define LV_USE_DRAW_ARM2D_SYNC 0
#endif
#endif
/* Enable native helium assembly to be compiled */
#ifndef LV_USE_NATIVE_HELIUM_ASM
#ifdef CONFIG_LV_USE_NATIVE_HELIUM_ASM
#define LV_USE_NATIVE_HELIUM_ASM CONFIG_LV_USE_NATIVE_HELIUM_ASM
#else
#define LV_USE_NATIVE_HELIUM_ASM 0
#endif
#endif
/* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only
* 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */
#ifndef LV_DRAW_SW_COMPLEX
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_DRAW_SW_COMPLEX
#define LV_DRAW_SW_COMPLEX CONFIG_LV_DRAW_SW_COMPLEX
#else
#define LV_DRAW_SW_COMPLEX 0
#endif
#else
#define LV_DRAW_SW_COMPLEX 1
#endif
#endif
#if LV_DRAW_SW_COMPLEX == 1
/*Allow buffering some shadow calculation.
*LV_DRAW_SW_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius`
*Caching has LV_DRAW_SW_SHADOW_CACHE_SIZE^2 RAM cost*/
#ifndef LV_DRAW_SW_SHADOW_CACHE_SIZE
#ifdef CONFIG_LV_DRAW_SW_SHADOW_CACHE_SIZE
#define LV_DRAW_SW_SHADOW_CACHE_SIZE CONFIG_LV_DRAW_SW_SHADOW_CACHE_SIZE
#else
#define LV_DRAW_SW_SHADOW_CACHE_SIZE 0
#endif
#endif
/* Set number of maximally cached circle data.
* The circumference of 1/4 circle are saved for anti-aliasing
* radius * 4 bytes are used per circle (the most often used radiuses are saved)
* 0: to disable caching */
#ifndef LV_DRAW_SW_CIRCLE_CACHE_SIZE
#ifdef CONFIG_LV_DRAW_SW_CIRCLE_CACHE_SIZE
#define LV_DRAW_SW_CIRCLE_CACHE_SIZE CONFIG_LV_DRAW_SW_CIRCLE_CACHE_SIZE
#else
#define LV_DRAW_SW_CIRCLE_CACHE_SIZE 4
#endif
#endif
#endif
#ifndef LV_USE_DRAW_SW_ASM
#ifdef CONFIG_LV_USE_DRAW_SW_ASM
#define LV_USE_DRAW_SW_ASM CONFIG_LV_USE_DRAW_SW_ASM
#else
#define LV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_NONE
#endif
#endif
#if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM
#ifndef LV_DRAW_SW_ASM_CUSTOM_INCLUDE
#ifdef CONFIG_LV_DRAW_SW_ASM_CUSTOM_INCLUDE
#define LV_DRAW_SW_ASM_CUSTOM_INCLUDE CONFIG_LV_DRAW_SW_ASM_CUSTOM_INCLUDE
#else
#define LV_DRAW_SW_ASM_CUSTOM_INCLUDE ""
#endif
#endif
#endif
#endif
/* Use NXP's VG-Lite GPU on iMX RTxxx platforms. */
#ifndef LV_USE_DRAW_VGLITE
#ifdef CONFIG_LV_USE_DRAW_VGLITE
#define LV_USE_DRAW_VGLITE CONFIG_LV_USE_DRAW_VGLITE
#else
#define LV_USE_DRAW_VGLITE 0
#endif
#endif
#if LV_USE_DRAW_VGLITE
/* Enable blit quality degradation workaround recommended for screen's dimension > 352 pixels. */
#ifndef LV_USE_VGLITE_BLIT_SPLIT
#ifdef CONFIG_LV_USE_VGLITE_BLIT_SPLIT
#define LV_USE_VGLITE_BLIT_SPLIT CONFIG_LV_USE_VGLITE_BLIT_SPLIT
#else
#define LV_USE_VGLITE_BLIT_SPLIT 0
#endif
#endif
#if LV_USE_OS
/* Enable VGLite draw async. Queue multiple tasks and flash them once to the GPU. */
#ifndef LV_USE_VGLITE_DRAW_ASYNC
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_USE_VGLITE_DRAW_ASYNC
#define LV_USE_VGLITE_DRAW_ASYNC CONFIG_LV_USE_VGLITE_DRAW_ASYNC
#else
#define LV_USE_VGLITE_DRAW_ASYNC 0
#endif
#else
#define LV_USE_VGLITE_DRAW_ASYNC 1
#endif
#endif
#endif
/* Enable VGLite asserts. */
#ifndef LV_USE_VGLITE_ASSERT
#ifdef CONFIG_LV_USE_VGLITE_ASSERT
#define LV_USE_VGLITE_ASSERT CONFIG_LV_USE_VGLITE_ASSERT
#else
#define LV_USE_VGLITE_ASSERT 0
#endif
#endif
#endif
/* Use NXP's PXP on iMX RTxxx platforms. */
#ifndef LV_USE_DRAW_PXP
#ifdef CONFIG_LV_USE_DRAW_PXP
#define LV_USE_DRAW_PXP CONFIG_LV_USE_DRAW_PXP
#else
#define LV_USE_DRAW_PXP 0
#endif
#endif
#if LV_USE_DRAW_PXP
/* Enable PXP asserts. */
#ifndef LV_USE_PXP_ASSERT
#ifdef CONFIG_LV_USE_PXP_ASSERT
#define LV_USE_PXP_ASSERT CONFIG_LV_USE_PXP_ASSERT
#else
#define LV_USE_PXP_ASSERT 0
#endif
#endif
#endif
/* Use Renesas Dave2D on RA platforms. */
#ifndef LV_USE_DRAW_DAVE2D
#ifdef CONFIG_LV_USE_DRAW_DAVE2D
#define LV_USE_DRAW_DAVE2D CONFIG_LV_USE_DRAW_DAVE2D
#else
#define LV_USE_DRAW_DAVE2D 0
#endif
#endif
/* Draw using cached SDL textures*/
#ifndef LV_USE_DRAW_SDL
#ifdef CONFIG_LV_USE_DRAW_SDL
#define LV_USE_DRAW_SDL CONFIG_LV_USE_DRAW_SDL
#else
#define LV_USE_DRAW_SDL 0
#endif
#endif
/* Use VG-Lite GPU. */
#ifndef LV_USE_DRAW_VG_LITE
#ifdef CONFIG_LV_USE_DRAW_VG_LITE
#define LV_USE_DRAW_VG_LITE CONFIG_LV_USE_DRAW_VG_LITE
#else
#define LV_USE_DRAW_VG_LITE 0
#endif
#endif
#if LV_USE_DRAW_VG_LITE
/* Enable VG-Lite custom external 'gpu_init()' function */
#ifndef LV_VG_LITE_USE_GPU_INIT
#ifdef CONFIG_LV_VG_LITE_USE_GPU_INIT
#define LV_VG_LITE_USE_GPU_INIT CONFIG_LV_VG_LITE_USE_GPU_INIT
#else
#define LV_VG_LITE_USE_GPU_INIT 0
#endif
#endif
/* Enable VG-Lite assert. */
#ifndef LV_VG_LITE_USE_ASSERT
#ifdef CONFIG_LV_VG_LITE_USE_ASSERT
#define LV_VG_LITE_USE_ASSERT CONFIG_LV_VG_LITE_USE_ASSERT
#else
#define LV_VG_LITE_USE_ASSERT 0
#endif
#endif
/* VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */
#ifndef LV_VG_LITE_FLUSH_MAX_COUNT
#ifdef CONFIG_LV_VG_LITE_FLUSH_MAX_COUNT
#define LV_VG_LITE_FLUSH_MAX_COUNT CONFIG_LV_VG_LITE_FLUSH_MAX_COUNT
#else
#define LV_VG_LITE_FLUSH_MAX_COUNT 8
#endif
#endif
/* Enable border to simulate shadow
* NOTE: which usually improves performance,
* but does not guarantee the same rendering quality as the software. */
#ifndef LV_VG_LITE_USE_BOX_SHADOW
#ifdef CONFIG_LV_VG_LITE_USE_BOX_SHADOW
#define LV_VG_LITE_USE_BOX_SHADOW CONFIG_LV_VG_LITE_USE_BOX_SHADOW
#else
#define LV_VG_LITE_USE_BOX_SHADOW 0
#endif
#endif
/* VG-Lite linear gradient image maximum cache number.
* NOTE: The memory usage of a single gradient image is 4K bytes.
*/
#ifndef LV_VG_LITE_LINEAR_GRAD_CACHE_CNT
#ifdef CONFIG_LV_VG_LITE_LINEAR_GRAD_CACHE_CNT
#define LV_VG_LITE_LINEAR_GRAD_CACHE_CNT CONFIG_LV_VG_LITE_LINEAR_GRAD_CACHE_CNT
#else
#define LV_VG_LITE_LINEAR_GRAD_CACHE_CNT 32
#endif
#endif
/* VG-Lite radial gradient image maximum cache size.
* NOTE: The memory usage of a single gradient image is radial grad radius * 4 bytes.
*/
#ifndef LV_VG_LITE_RADIAL_GRAD_CACHE_CNT
#ifdef CONFIG_LV_VG_LITE_RADIAL_GRAD_CACHE_CNT
#define LV_VG_LITE_RADIAL_GRAD_CACHE_CNT CONFIG_LV_VG_LITE_RADIAL_GRAD_CACHE_CNT
#else
#define LV_VG_LITE_RADIAL_GRAD_CACHE_CNT 32
#endif
#endif
#endif
/*=======================
* FEATURE CONFIGURATION
*=======================*/
/*-------------
* Logging
*-----------*/
/*Enable the log module*/
#ifndef LV_USE_LOG
#ifdef CONFIG_LV_USE_LOG
#define LV_USE_LOG CONFIG_LV_USE_LOG
#else
#define LV_USE_LOG 0
#endif
#endif
#if LV_USE_LOG
/*How important log should be added:
*LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
*LV_LOG_LEVEL_INFO Log important events
*LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
*LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
*LV_LOG_LEVEL_USER Only logs added by the user
*LV_LOG_LEVEL_NONE Do not log anything*/
#ifndef LV_LOG_LEVEL
#ifdef CONFIG_LV_LOG_LEVEL
#define LV_LOG_LEVEL CONFIG_LV_LOG_LEVEL
#else
#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
#endif
#endif
/*1: Print the log with 'printf';
*0: User need to register a callback with `lv_log_register_print_cb()`*/
#ifndef LV_LOG_PRINTF
#ifdef CONFIG_LV_LOG_PRINTF
#define LV_LOG_PRINTF CONFIG_LV_LOG_PRINTF
#else
#define LV_LOG_PRINTF 0
#endif
#endif
/*1: Enable print timestamp;
*0: Disable print timestamp*/
#ifndef LV_LOG_USE_TIMESTAMP
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_USE_TIMESTAMP
#define LV_LOG_USE_TIMESTAMP CONFIG_LV_LOG_USE_TIMESTAMP
#else
#define LV_LOG_USE_TIMESTAMP 0
#endif
#else
#define LV_LOG_USE_TIMESTAMP 1
#endif
#endif
/*1: Print file and line number of the log;
*0: Do not print file and line number of the log*/
#ifndef LV_LOG_USE_FILE_LINE
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_USE_FILE_LINE
#define LV_LOG_USE_FILE_LINE CONFIG_LV_LOG_USE_FILE_LINE
#else
#define LV_LOG_USE_FILE_LINE 0
#endif
#else
#define LV_LOG_USE_FILE_LINE 1
#endif
#endif
/*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
#ifndef LV_LOG_TRACE_MEM
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_TRACE_MEM
#define LV_LOG_TRACE_MEM CONFIG_LV_LOG_TRACE_MEM
#else
#define LV_LOG_TRACE_MEM 0
#endif
#else
#define LV_LOG_TRACE_MEM 1
#endif
#endif
#ifndef LV_LOG_TRACE_TIMER
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_TRACE_TIMER
#define LV_LOG_TRACE_TIMER CONFIG_LV_LOG_TRACE_TIMER
#else
#define LV_LOG_TRACE_TIMER 0
#endif
#else
#define LV_LOG_TRACE_TIMER 1
#endif
#endif
#ifndef LV_LOG_TRACE_INDEV
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_TRACE_INDEV
#define LV_LOG_TRACE_INDEV CONFIG_LV_LOG_TRACE_INDEV
#else
#define LV_LOG_TRACE_INDEV 0
#endif
#else
#define LV_LOG_TRACE_INDEV 1
#endif
#endif
#ifndef LV_LOG_TRACE_DISP_REFR
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_TRACE_DISP_REFR
#define LV_LOG_TRACE_DISP_REFR CONFIG_LV_LOG_TRACE_DISP_REFR
#else
#define LV_LOG_TRACE_DISP_REFR 0
#endif
#else
#define LV_LOG_TRACE_DISP_REFR 1
#endif
#endif
#ifndef LV_LOG_TRACE_EVENT
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_TRACE_EVENT
#define LV_LOG_TRACE_EVENT CONFIG_LV_LOG_TRACE_EVENT
#else
#define LV_LOG_TRACE_EVENT 0
#endif
#else
#define LV_LOG_TRACE_EVENT 1
#endif
#endif
#ifndef LV_LOG_TRACE_OBJ_CREATE
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_TRACE_OBJ_CREATE
#define LV_LOG_TRACE_OBJ_CREATE CONFIG_LV_LOG_TRACE_OBJ_CREATE
#else
#define LV_LOG_TRACE_OBJ_CREATE 0
#endif
#else
#define LV_LOG_TRACE_OBJ_CREATE 1
#endif
#endif
#ifndef LV_LOG_TRACE_LAYOUT
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_TRACE_LAYOUT
#define LV_LOG_TRACE_LAYOUT CONFIG_LV_LOG_TRACE_LAYOUT
#else
#define LV_LOG_TRACE_LAYOUT 0
#endif
#else
#define LV_LOG_TRACE_LAYOUT 1
#endif
#endif
#ifndef LV_LOG_TRACE_ANIM
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_TRACE_ANIM
#define LV_LOG_TRACE_ANIM CONFIG_LV_LOG_TRACE_ANIM
#else
#define LV_LOG_TRACE_ANIM 0
#endif
#else
#define LV_LOG_TRACE_ANIM 1
#endif
#endif
#ifndef LV_LOG_TRACE_CACHE
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_LOG_TRACE_CACHE
#define LV_LOG_TRACE_CACHE CONFIG_LV_LOG_TRACE_CACHE
#else
#define LV_LOG_TRACE_CACHE 0
#endif
#else
#define LV_LOG_TRACE_CACHE 1
#endif
#endif
#endif /*LV_USE_LOG*/
/*-------------
* Asserts
*-----------*/
/*Enable asserts if an operation is failed or an invalid data is found.
*If LV_USE_LOG is enabled an error message will be printed on failure*/
#ifndef LV_USE_ASSERT_NULL
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_USE_ASSERT_NULL
#define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL
#else
#define LV_USE_ASSERT_NULL 0
#endif
#else
#define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/
#endif
#endif
#ifndef LV_USE_ASSERT_MALLOC
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_USE_ASSERT_MALLOC
#define LV_USE_ASSERT_MALLOC CONFIG_LV_USE_ASSERT_MALLOC
#else
#define LV_USE_ASSERT_MALLOC 0
#endif
#else
#define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
#endif
#endif
#ifndef LV_USE_ASSERT_STYLE
#ifdef CONFIG_LV_USE_ASSERT_STYLE
#define LV_USE_ASSERT_STYLE CONFIG_LV_USE_ASSERT_STYLE
#else
#define LV_USE_ASSERT_STYLE 0 /*Check if the styles are properly initialized. (Very fast, recommended)*/
#endif
#endif
#ifndef LV_USE_ASSERT_MEM_INTEGRITY
#ifdef CONFIG_LV_USE_ASSERT_MEM_INTEGRITY
#define LV_USE_ASSERT_MEM_INTEGRITY CONFIG_LV_USE_ASSERT_MEM_INTEGRITY
#else
#define LV_USE_ASSERT_MEM_INTEGRITY 0 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/
#endif
#endif
#ifndef LV_USE_ASSERT_OBJ
#ifdef CONFIG_LV_USE_ASSERT_OBJ
#define LV_USE_ASSERT_OBJ CONFIG_LV_USE_ASSERT_OBJ
#else
#define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/
#endif
#endif
/*Add a custom handler when assert happens e.g. to restart the MCU*/
#ifndef LV_ASSERT_HANDLER_INCLUDE
#ifdef CONFIG_LV_ASSERT_HANDLER_INCLUDE
#define LV_ASSERT_HANDLER_INCLUDE CONFIG_LV_ASSERT_HANDLER_INCLUDE
#else
#define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
#endif
#endif
#ifndef LV_ASSERT_HANDLER
#ifdef CONFIG_LV_ASSERT_HANDLER
#define LV_ASSERT_HANDLER CONFIG_LV_ASSERT_HANDLER
#else
#define LV_ASSERT_HANDLER while(1); /*Halt by default*/
#endif
#endif
/*-------------
* Debug
*-----------*/
/*1: Draw random colored rectangles over the redrawn areas*/
#ifndef LV_USE_REFR_DEBUG
#ifdef CONFIG_LV_USE_REFR_DEBUG
#define LV_USE_REFR_DEBUG CONFIG_LV_USE_REFR_DEBUG
#else
#define LV_USE_REFR_DEBUG 0
#endif
#endif
/*1: Draw a red overlay for ARGB layers and a green overlay for RGB layers*/
#ifndef LV_USE_LAYER_DEBUG
#ifdef CONFIG_LV_USE_LAYER_DEBUG
#define LV_USE_LAYER_DEBUG CONFIG_LV_USE_LAYER_DEBUG
#else
#define LV_USE_LAYER_DEBUG 0
#endif
#endif
/*1: Draw overlays with different colors for each draw_unit's tasks.
*Also add the index number of the draw unit on white background.
*For layers add the index number of the draw unit on black background.*/
#ifndef LV_USE_PARALLEL_DRAW_DEBUG
#ifdef CONFIG_LV_USE_PARALLEL_DRAW_DEBUG
#define LV_USE_PARALLEL_DRAW_DEBUG CONFIG_LV_USE_PARALLEL_DRAW_DEBUG
#else
#define LV_USE_PARALLEL_DRAW_DEBUG 0
#endif
#endif
/*-------------
* Others
*-----------*/
#ifndef LV_ENABLE_GLOBAL_CUSTOM
#ifdef CONFIG_LV_ENABLE_GLOBAL_CUSTOM
#define LV_ENABLE_GLOBAL_CUSTOM CONFIG_LV_ENABLE_GLOBAL_CUSTOM
#else
#define LV_ENABLE_GLOBAL_CUSTOM 0
#endif
#endif
#if LV_ENABLE_GLOBAL_CUSTOM
/*Header to include for the custom 'lv_global' function"*/
#ifndef LV_GLOBAL_CUSTOM_INCLUDE
#ifdef CONFIG_LV_GLOBAL_CUSTOM_INCLUDE
#define LV_GLOBAL_CUSTOM_INCLUDE CONFIG_LV_GLOBAL_CUSTOM_INCLUDE
#else
#define LV_GLOBAL_CUSTOM_INCLUDE <stdint.h>
#endif
#endif
#endif
/*Default cache size in bytes.
*Used by image decoders such as `lv_lodepng` to keep the decoded image in the memory.
*If size is not set to 0, the decoder will fail to decode when the cache is full.
*If size is 0, the cache function is not enabled and the decoded mem will be released immediately after use.*/
#ifndef LV_CACHE_DEF_SIZE
#ifdef CONFIG_LV_CACHE_DEF_SIZE
#define LV_CACHE_DEF_SIZE CONFIG_LV_CACHE_DEF_SIZE
#else
#define LV_CACHE_DEF_SIZE 0
#endif
#endif
/*Default number of image header cache entries. The cache is used to store the headers of images
*The main logic is like `LV_CACHE_DEF_SIZE` but for image headers.*/
#ifndef LV_IMAGE_HEADER_CACHE_DEF_CNT
#ifdef CONFIG_LV_IMAGE_HEADER_CACHE_DEF_CNT
#define LV_IMAGE_HEADER_CACHE_DEF_CNT CONFIG_LV_IMAGE_HEADER_CACHE_DEF_CNT
#else
#define LV_IMAGE_HEADER_CACHE_DEF_CNT 0
#endif
#endif
/*Number of stops allowed per gradient. Increase this to allow more stops.
*This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/
#ifndef LV_GRADIENT_MAX_STOPS
#ifdef CONFIG_LV_GRADIENT_MAX_STOPS
#define LV_GRADIENT_MAX_STOPS CONFIG_LV_GRADIENT_MAX_STOPS
#else
#define LV_GRADIENT_MAX_STOPS 2
#endif
#endif
/* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently.
* 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */
#ifndef LV_COLOR_MIX_ROUND_OFS
#ifdef CONFIG_LV_COLOR_MIX_ROUND_OFS
#define LV_COLOR_MIX_ROUND_OFS CONFIG_LV_COLOR_MIX_ROUND_OFS
#else
#define LV_COLOR_MIX_ROUND_OFS 0
#endif
#endif
/* Add 2 x 32 bit variables to each lv_obj_t to speed up getting style properties */
#ifndef LV_OBJ_STYLE_CACHE
#ifdef CONFIG_LV_OBJ_STYLE_CACHE
#define LV_OBJ_STYLE_CACHE CONFIG_LV_OBJ_STYLE_CACHE
#else
#define LV_OBJ_STYLE_CACHE 0
#endif
#endif
/* Add `id` field to `lv_obj_t` */
#ifndef LV_USE_OBJ_ID
#ifdef CONFIG_LV_USE_OBJ_ID
#define LV_USE_OBJ_ID CONFIG_LV_USE_OBJ_ID
#else
#define LV_USE_OBJ_ID 0
#endif
#endif
/* Use lvgl builtin method for obj ID */
#ifndef LV_USE_OBJ_ID_BUILTIN
#ifdef CONFIG_LV_USE_OBJ_ID_BUILTIN
#define LV_USE_OBJ_ID_BUILTIN CONFIG_LV_USE_OBJ_ID_BUILTIN
#else
#define LV_USE_OBJ_ID_BUILTIN 0
#endif
#endif
/*Use obj property set/get API*/
#ifndef LV_USE_OBJ_PROPERTY
#ifdef CONFIG_LV_USE_OBJ_PROPERTY
#define LV_USE_OBJ_PROPERTY CONFIG_LV_USE_OBJ_PROPERTY
#else
#define LV_USE_OBJ_PROPERTY 0
#endif
#endif
/* VG-Lite Simulator */
/*Requires: LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL */
#ifndef LV_USE_VG_LITE_THORVG
#ifdef CONFIG_LV_USE_VG_LITE_THORVG
#define LV_USE_VG_LITE_THORVG CONFIG_LV_USE_VG_LITE_THORVG
#else
#define LV_USE_VG_LITE_THORVG 0
#endif
#endif
#if LV_USE_VG_LITE_THORVG
/*Enable LVGL's blend mode support*/
#ifndef LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
#ifdef CONFIG_LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
#define LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT CONFIG_LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT
#else
#define LV_VG_LITE_THORVG_LVGL_BLEND_SUPPORT 0
#endif
#endif
/*Enable YUV color format support*/
#ifndef LV_VG_LITE_THORVG_YUV_SUPPORT
#ifdef CONFIG_LV_VG_LITE_THORVG_YUV_SUPPORT
#define LV_VG_LITE_THORVG_YUV_SUPPORT CONFIG_LV_VG_LITE_THORVG_YUV_SUPPORT
#else
#define LV_VG_LITE_THORVG_YUV_SUPPORT 0
#endif
#endif
/*Enable 16 pixels alignment*/
#ifndef LV_VG_LITE_THORVG_16PIXELS_ALIGN
#ifdef _LV_KCONFIG_PRESENT
#ifdef CONFIG_LV_VG_LITE_THORVG_16PIXELS_ALIGN
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN CONFIG_LV_VG_LITE_THORVG_16PIXELS_ALIGN
#else
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN 0
#endif
#else
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1
#endif
#endif
/*Buffer address alignment*/
#ifndef LV_VG_LITE_THORVG_BUF_ADDR_ALIGN
#ifdef CONFIG_LV_VG_LITE_THORVG_BUF_ADDR_ALIGN
#define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN CONFIG_LV_VG_LITE_THORVG_BUF_ADDR_ALIGN
#else
#define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN 64
#endif
#endif