acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

lv_conf_internal.h (70494B)

      1 /**
      2  * GENERATED FILE, DO NOT EDIT IT!
      3  * @file lv_conf_internal.h
      4  * Make sure all the 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 #include <stdint.h>
     12 
     13 /* Handle special Kconfig options */
     14 #ifndef LV_KCONFIG_IGNORE
     15     #include "lv_conf_kconfig.h"
     16     #ifdef CONFIG_LV_CONF_SKIP
     17         #define LV_CONF_SKIP
     18     #endif
     19 #endif
     20 
     21 /*If "lv_conf.h" is available from here try to use it later.*/
     22 #ifdef __has_include
     23     #if __has_include("lv_conf.h")
     24         #ifndef LV_CONF_INCLUDE_SIMPLE
     25             #define LV_CONF_INCLUDE_SIMPLE
     26         #endif
     27     #endif
     28 #endif
     29 
     30 /*If lv_conf.h is not skipped include it*/
     31 #ifndef LV_CONF_SKIP
     32     #ifdef LV_CONF_PATH                           /*If there is a path defined for lv_conf.h use it*/
     33         #define __LV_TO_STR_AUX(x) #x
     34         #define __LV_TO_STR(x) __LV_TO_STR_AUX(x)
     35         #include __LV_TO_STR(LV_CONF_PATH)
     36         #undef __LV_TO_STR_AUX
     37         #undef __LV_TO_STR
     38     #elif defined(LV_CONF_INCLUDE_SIMPLE)         /*Or simply include lv_conf.h is enabled*/
     39         #include "lv_conf.h"
     40     #else
     41         #include "../../lv_conf.h"                /*Else assume lv_conf.h is next to the lvgl folder*/
     42     #endif
     43     #if !defined(LV_CONF_H) && !defined(LV_CONF_SUPPRESS_DEFINE_CHECK)
     44         /* #include will sometimes silently fail when __has_include is used */
     45         /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80753 */
     46         #pragma message("Possible failure to include lv_conf.h, please read the comment in this file if you get errors")
     47     #endif
     48 #endif
     49 
     50 #ifdef CONFIG_LV_COLOR_DEPTH
     51     #define _LV_KCONFIG_PRESENT
     52 #endif
     53 
     54 /*----------------------------------
     55  * Start parsing lv_conf_template.h
     56  -----------------------------------*/
     57 
     58 #include <stdint.h>
     59 
     60 /*====================
     61    COLOR SETTINGS
     62  *====================*/
     63 
     64 /*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/
     65 #ifndef LV_COLOR_DEPTH
     66     #ifdef CONFIG_LV_COLOR_DEPTH
     67         #define LV_COLOR_DEPTH CONFIG_LV_COLOR_DEPTH
     68     #else
     69         #define LV_COLOR_DEPTH 16
     70     #endif
     71 #endif
     72 
     73 /*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/
     74 #ifndef LV_COLOR_16_SWAP
     75     #ifdef CONFIG_LV_COLOR_16_SWAP
     76         #define LV_COLOR_16_SWAP CONFIG_LV_COLOR_16_SWAP
     77     #else
     78         #define LV_COLOR_16_SWAP 0
     79     #endif
     80 #endif
     81 
     82 /*Enable more complex drawing routines to manage screens transparency.
     83  *Can be used if the UI is above another layer, e.g. an OSD menu or video player.
     84  *Requires `LV_COLOR_DEPTH = 32` colors and the screen's `bg_opa` should be set to non LV_OPA_COVER value*/
     85 #ifndef LV_COLOR_SCREEN_TRANSP
     86     #ifdef CONFIG_LV_COLOR_SCREEN_TRANSP
     87         #define LV_COLOR_SCREEN_TRANSP CONFIG_LV_COLOR_SCREEN_TRANSP
     88     #else
     89         #define LV_COLOR_SCREEN_TRANSP 0
     90     #endif
     91 #endif
     92 
     93 /* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently.
     94  * 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */
     95 #ifndef LV_COLOR_MIX_ROUND_OFS
     96     #ifdef CONFIG_LV_COLOR_MIX_ROUND_OFS
     97         #define LV_COLOR_MIX_ROUND_OFS CONFIG_LV_COLOR_MIX_ROUND_OFS
     98     #else
     99         #define LV_COLOR_MIX_ROUND_OFS (LV_COLOR_DEPTH == 32 ? 0: 128)
    100     #endif
    101 #endif
    102 
    103 /*Images pixels with this color will not be drawn if they are chroma keyed)*/
    104 #ifndef LV_COLOR_CHROMA_KEY
    105     #ifdef CONFIG_LV_COLOR_CHROMA_KEY
    106         #define LV_COLOR_CHROMA_KEY CONFIG_LV_COLOR_CHROMA_KEY
    107     #else
    108         #define LV_COLOR_CHROMA_KEY lv_color_hex(0x00ff00)         /*pure green*/
    109     #endif
    110 #endif
    111 
    112 /*=========================
    113    MEMORY SETTINGS
    114  *=========================*/
    115 
    116 /*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/
    117 #ifndef LV_MEM_CUSTOM
    118     #ifdef CONFIG_LV_MEM_CUSTOM
    119         #define LV_MEM_CUSTOM CONFIG_LV_MEM_CUSTOM
    120     #else
    121         #define LV_MEM_CUSTOM 0
    122     #endif
    123 #endif
    124 #if LV_MEM_CUSTOM == 0
    125     /*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
    126     #ifndef LV_MEM_SIZE
    127         #ifdef CONFIG_LV_MEM_SIZE
    128             #define LV_MEM_SIZE CONFIG_LV_MEM_SIZE
    129         #else
    130             #define LV_MEM_SIZE (48U * 1024U)          /*[bytes]*/
    131         #endif
    132     #endif
    133 
    134     /*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
    135     #ifndef LV_MEM_ADR
    136         #ifdef CONFIG_LV_MEM_ADR
    137             #define LV_MEM_ADR CONFIG_LV_MEM_ADR
    138         #else
    139             #define LV_MEM_ADR 0     /*0: unused*/
    140         #endif
    141     #endif
    142     /*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
    143     #if LV_MEM_ADR == 0
    144         //#define LV_MEM_POOL_INCLUDE your_alloc_library  /* Uncomment if using an external allocator*/
    145         //#define LV_MEM_POOL_ALLOC   your_alloc          /* Uncomment if using an external allocator*/
    146     #endif
    147 
    148 #else       /*LV_MEM_CUSTOM*/
    149     #ifndef LV_MEM_CUSTOM_INCLUDE
    150         #ifdef CONFIG_LV_MEM_CUSTOM_INCLUDE
    151             #define LV_MEM_CUSTOM_INCLUDE CONFIG_LV_MEM_CUSTOM_INCLUDE
    152         #else
    153             #define LV_MEM_CUSTOM_INCLUDE <stdlib.h>   /*Header for the dynamic memory function*/
    154         #endif
    155     #endif
    156     #ifndef LV_MEM_CUSTOM_ALLOC
    157         #ifdef CONFIG_LV_MEM_CUSTOM_ALLOC
    158             #define LV_MEM_CUSTOM_ALLOC CONFIG_LV_MEM_CUSTOM_ALLOC
    159         #else
    160             #define LV_MEM_CUSTOM_ALLOC   malloc
    161         #endif
    162     #endif
    163     #ifndef LV_MEM_CUSTOM_FREE
    164         #ifdef CONFIG_LV_MEM_CUSTOM_FREE
    165             #define LV_MEM_CUSTOM_FREE CONFIG_LV_MEM_CUSTOM_FREE
    166         #else
    167             #define LV_MEM_CUSTOM_FREE    free
    168         #endif
    169     #endif
    170     #ifndef LV_MEM_CUSTOM_REALLOC
    171         #ifdef CONFIG_LV_MEM_CUSTOM_REALLOC
    172             #define LV_MEM_CUSTOM_REALLOC CONFIG_LV_MEM_CUSTOM_REALLOC
    173         #else
    174             #define LV_MEM_CUSTOM_REALLOC realloc
    175         #endif
    176     #endif
    177 #endif     /*LV_MEM_CUSTOM*/
    178 
    179 /*Number of the intermediate memory buffer used during rendering and other internal processing mechanisms.
    180  *You will see an error log message if there wasn't enough buffers. */
    181 #ifndef LV_MEM_BUF_MAX_NUM
    182     #ifdef CONFIG_LV_MEM_BUF_MAX_NUM
    183         #define LV_MEM_BUF_MAX_NUM CONFIG_LV_MEM_BUF_MAX_NUM
    184     #else
    185         #define LV_MEM_BUF_MAX_NUM 16
    186     #endif
    187 #endif
    188 
    189 /*Use the standard `memcpy` and `memset` instead of LVGL's own functions. (Might or might not be faster).*/
    190 #ifndef LV_MEMCPY_MEMSET_STD
    191     #ifdef CONFIG_LV_MEMCPY_MEMSET_STD
    192         #define LV_MEMCPY_MEMSET_STD CONFIG_LV_MEMCPY_MEMSET_STD
    193     #else
    194         #define LV_MEMCPY_MEMSET_STD 0
    195     #endif
    196 #endif
    197 
    198 /*====================
    199    HAL SETTINGS
    200  *====================*/
    201 
    202 /*Default display refresh period. LVG will redraw changed areas with this period time*/
    203 #ifndef LV_DISP_DEF_REFR_PERIOD
    204     #ifdef CONFIG_LV_DISP_DEF_REFR_PERIOD
    205         #define LV_DISP_DEF_REFR_PERIOD CONFIG_LV_DISP_DEF_REFR_PERIOD
    206     #else
    207         #define LV_DISP_DEF_REFR_PERIOD 30      /*[ms]*/
    208     #endif
    209 #endif
    210 
    211 /*Input device read period in milliseconds*/
    212 #ifndef LV_INDEV_DEF_READ_PERIOD
    213     #ifdef CONFIG_LV_INDEV_DEF_READ_PERIOD
    214         #define LV_INDEV_DEF_READ_PERIOD CONFIG_LV_INDEV_DEF_READ_PERIOD
    215     #else
    216         #define LV_INDEV_DEF_READ_PERIOD 30     /*[ms]*/
    217     #endif
    218 #endif
    219 
    220 /*Use a custom tick source that tells the elapsed time in milliseconds.
    221  *It removes the need to manually update the tick with `lv_tick_inc()`)*/
    222 #ifndef LV_TICK_CUSTOM
    223     #ifdef CONFIG_LV_TICK_CUSTOM
    224         #define LV_TICK_CUSTOM CONFIG_LV_TICK_CUSTOM
    225     #else
    226         #define LV_TICK_CUSTOM 0
    227     #endif
    228 #endif
    229 #if LV_TICK_CUSTOM
    230     #ifndef LV_TICK_CUSTOM_INCLUDE
    231         #ifdef CONFIG_LV_TICK_CUSTOM_INCLUDE
    232             #define LV_TICK_CUSTOM_INCLUDE CONFIG_LV_TICK_CUSTOM_INCLUDE
    233         #else
    234             #define LV_TICK_CUSTOM_INCLUDE "Arduino.h"         /*Header for the system time function*/
    235         #endif
    236     #endif
    237     #ifndef LV_TICK_CUSTOM_SYS_TIME_EXPR
    238         #ifdef CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR
    239             #define LV_TICK_CUSTOM_SYS_TIME_EXPR CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR
    240         #else
    241             #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis())    /*Expression evaluating to current system time in ms*/
    242         #endif
    243     #endif
    244 #endif   /*LV_TICK_CUSTOM*/
    245 
    246 /*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
    247  *(Not so important, you can adjust it to modify default sizes and spaces)*/
    248 #ifndef LV_DPI_DEF
    249     #ifdef CONFIG_LV_DPI_DEF
    250         #define LV_DPI_DEF CONFIG_LV_DPI_DEF
    251     #else
    252         #define LV_DPI_DEF 130     /*[px/inch]*/
    253     #endif
    254 #endif
    255 
    256 /*=======================
    257  * FEATURE CONFIGURATION
    258  *=======================*/
    259 
    260 /*-------------
    261  * Drawing
    262  *-----------*/
    263 
    264 /*Enable complex draw engine.
    265  *Required to draw shadow, gradient, rounded corners, circles, arc, skew lines, image transformations or any masks*/
    266 #ifndef LV_DRAW_COMPLEX
    267     #ifdef _LV_KCONFIG_PRESENT
    268         #ifdef CONFIG_LV_DRAW_COMPLEX
    269             #define LV_DRAW_COMPLEX CONFIG_LV_DRAW_COMPLEX
    270         #else
    271             #define LV_DRAW_COMPLEX 0
    272         #endif
    273     #else
    274         #define LV_DRAW_COMPLEX 1
    275     #endif
    276 #endif
    277 #if LV_DRAW_COMPLEX != 0
    278 
    279     /*Allow buffering some shadow calculation.
    280     *LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius`
    281     *Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
    282     #ifndef LV_SHADOW_CACHE_SIZE
    283         #ifdef CONFIG_LV_SHADOW_CACHE_SIZE
    284             #define LV_SHADOW_CACHE_SIZE CONFIG_LV_SHADOW_CACHE_SIZE
    285         #else
    286             #define LV_SHADOW_CACHE_SIZE 0
    287         #endif
    288     #endif
    289 
    290     /* Set number of maximally cached circle data.
    291     * The circumference of 1/4 circle are saved for anti-aliasing
    292     * radius * 4 bytes are used per circle (the most often used radiuses are saved)
    293     * 0: to disable caching */
    294     #ifndef LV_CIRCLE_CACHE_SIZE
    295         #ifdef CONFIG_LV_CIRCLE_CACHE_SIZE
    296             #define LV_CIRCLE_CACHE_SIZE CONFIG_LV_CIRCLE_CACHE_SIZE
    297         #else
    298             #define LV_CIRCLE_CACHE_SIZE 4
    299         #endif
    300     #endif
    301 #endif /*LV_DRAW_COMPLEX*/
    302 
    303 /*Default image cache size. Image caching keeps the images opened.
    304  *If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added)
    305  *With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
    306  *However the opened images might consume additional RAM.
    307  *0: to disable caching*/
    308 #ifndef LV_IMG_CACHE_DEF_SIZE
    309     #ifdef CONFIG_LV_IMG_CACHE_DEF_SIZE
    310         #define LV_IMG_CACHE_DEF_SIZE CONFIG_LV_IMG_CACHE_DEF_SIZE
    311     #else
    312         #define LV_IMG_CACHE_DEF_SIZE   0
    313     #endif
    314 #endif
    315 
    316 /*Number of stops allowed per gradient. Increase this to allow more stops.
    317  *This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/
    318 #ifndef LV_GRADIENT_MAX_STOPS
    319     #ifdef CONFIG_LV_GRADIENT_MAX_STOPS
    320         #define LV_GRADIENT_MAX_STOPS CONFIG_LV_GRADIENT_MAX_STOPS
    321     #else
    322         #define LV_GRADIENT_MAX_STOPS       2
    323     #endif
    324 #endif
    325 
    326 /*Default gradient buffer size.
    327  *When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again.
    328  *LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes.
    329  *If the cache is too small the map will be allocated only while it's required for the drawing.
    330  *0 mean no caching.*/
    331 #ifndef LV_GRAD_CACHE_DEF_SIZE
    332     #ifdef CONFIG_LV_GRAD_CACHE_DEF_SIZE
    333         #define LV_GRAD_CACHE_DEF_SIZE CONFIG_LV_GRAD_CACHE_DEF_SIZE
    334     #else
    335         #define LV_GRAD_CACHE_DEF_SIZE      0
    336     #endif
    337 #endif
    338 
    339 /*Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display)
    340  *LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface
    341  *The increase in memory consumption is (32 bits * object width) plus 24 bits * object width if using error diffusion */
    342 #ifndef LV_DITHER_GRADIENT
    343     #ifdef CONFIG_LV_DITHER_GRADIENT
    344         #define LV_DITHER_GRADIENT CONFIG_LV_DITHER_GRADIENT
    345     #else
    346         #define LV_DITHER_GRADIENT      0
    347     #endif
    348 #endif
    349 #if LV_DITHER_GRADIENT
    350     /*Add support for error diffusion dithering.
    351      *Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing.
    352      *The increase in memory consumption is (24 bits * object's width)*/
    353     #ifndef LV_DITHER_ERROR_DIFFUSION
    354         #ifdef CONFIG_LV_DITHER_ERROR_DIFFUSION
    355             #define LV_DITHER_ERROR_DIFFUSION CONFIG_LV_DITHER_ERROR_DIFFUSION
    356         #else
    357             #define LV_DITHER_ERROR_DIFFUSION   0
    358         #endif
    359     #endif
    360 #endif
    361 
    362 /*Maximum buffer size to allocate for rotation.
    363  *Only used if software rotation is enabled in the display driver.*/
    364 #ifndef LV_DISP_ROT_MAX_BUF
    365     #ifdef CONFIG_LV_DISP_ROT_MAX_BUF
    366         #define LV_DISP_ROT_MAX_BUF CONFIG_LV_DISP_ROT_MAX_BUF
    367     #else
    368         #define LV_DISP_ROT_MAX_BUF (10*1024)
    369     #endif
    370 #endif
    371 
    372 /*-------------
    373  * GPU
    374  *-----------*/
    375 
    376 /*Use Arm's 2D acceleration library Arm-2D */
    377 #ifndef LV_USE_GPU_ARM2D
    378     #ifdef CONFIG_LV_USE_GPU_ARM2D
    379         #define LV_USE_GPU_ARM2D CONFIG_LV_USE_GPU_ARM2D
    380     #else
    381         #define LV_USE_GPU_ARM2D 0
    382     #endif
    383 #endif
    384 
    385 /*Use STM32's DMA2D (aka Chrom Art) GPU*/
    386 #ifndef LV_USE_GPU_STM32_DMA2D
    387     #ifdef CONFIG_LV_USE_GPU_STM32_DMA2D
    388         #define LV_USE_GPU_STM32_DMA2D CONFIG_LV_USE_GPU_STM32_DMA2D
    389     #else
    390         #define LV_USE_GPU_STM32_DMA2D 0
    391     #endif
    392 #endif
    393 #if LV_USE_GPU_STM32_DMA2D
    394     /*Must be defined to include path of CMSIS header of target processor
    395     e.g. "stm32f769xx.h" or "stm32f429xx.h"*/
    396     #ifndef LV_GPU_DMA2D_CMSIS_INCLUDE
    397         #ifdef CONFIG_LV_GPU_DMA2D_CMSIS_INCLUDE
    398             #define LV_GPU_DMA2D_CMSIS_INCLUDE CONFIG_LV_GPU_DMA2D_CMSIS_INCLUDE
    399         #else
    400             #define LV_GPU_DMA2D_CMSIS_INCLUDE
    401         #endif
    402     #endif
    403 #endif
    404 
    405 /*Use NXP's PXP GPU iMX RTxxx platforms*/
    406 #ifndef LV_USE_GPU_NXP_PXP
    407     #ifdef CONFIG_LV_USE_GPU_NXP_PXP
    408         #define LV_USE_GPU_NXP_PXP CONFIG_LV_USE_GPU_NXP_PXP
    409     #else
    410         #define LV_USE_GPU_NXP_PXP 0
    411     #endif
    412 #endif
    413 #if LV_USE_GPU_NXP_PXP
    414     /*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
    415     *   and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol SDK_OS_FREE_RTOS
    416     *   has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
    417     *0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
    418     */
    419     #ifndef LV_USE_GPU_NXP_PXP_AUTO_INIT
    420         #ifdef CONFIG_LV_USE_GPU_NXP_PXP_AUTO_INIT
    421             #define LV_USE_GPU_NXP_PXP_AUTO_INIT CONFIG_LV_USE_GPU_NXP_PXP_AUTO_INIT
    422         #else
    423             #define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
    424         #endif
    425     #endif
    426 #endif
    427 
    428 /*Use NXP's VG-Lite GPU iMX RTxxx platforms*/
    429 #ifndef LV_USE_GPU_NXP_VG_LITE
    430     #ifdef CONFIG_LV_USE_GPU_NXP_VG_LITE
    431         #define LV_USE_GPU_NXP_VG_LITE CONFIG_LV_USE_GPU_NXP_VG_LITE
    432     #else
    433         #define LV_USE_GPU_NXP_VG_LITE 0
    434     #endif
    435 #endif
    436 
    437 /*Use SDL renderer API*/
    438 #ifndef LV_USE_GPU_SDL
    439     #ifdef CONFIG_LV_USE_GPU_SDL
    440         #define LV_USE_GPU_SDL CONFIG_LV_USE_GPU_SDL
    441     #else
    442         #define LV_USE_GPU_SDL 0
    443     #endif
    444 #endif
    445 #if LV_USE_GPU_SDL
    446     #ifndef LV_GPU_SDL_INCLUDE_PATH
    447         #ifdef CONFIG_LV_GPU_SDL_INCLUDE_PATH
    448             #define LV_GPU_SDL_INCLUDE_PATH CONFIG_LV_GPU_SDL_INCLUDE_PATH
    449         #else
    450             #define LV_GPU_SDL_INCLUDE_PATH <SDL2/SDL.h>
    451         #endif
    452     #endif
    453     /*Texture cache size, 8MB by default*/
    454     #ifndef LV_GPU_SDL_LRU_SIZE
    455         #ifdef CONFIG_LV_GPU_SDL_LRU_SIZE
    456             #define LV_GPU_SDL_LRU_SIZE CONFIG_LV_GPU_SDL_LRU_SIZE
    457         #else
    458             #define LV_GPU_SDL_LRU_SIZE (1024 * 1024 * 8)
    459         #endif
    460     #endif
    461     /*Custom blend mode for mask drawing, disable if you need to link with older SDL2 lib*/
    462     #ifndef LV_GPU_SDL_CUSTOM_BLEND_MODE
    463         #ifdef CONFIG_LV_GPU_SDL_CUSTOM_BLEND_MODE
    464             #define LV_GPU_SDL_CUSTOM_BLEND_MODE CONFIG_LV_GPU_SDL_CUSTOM_BLEND_MODE
    465         #else
    466             #define LV_GPU_SDL_CUSTOM_BLEND_MODE (SDL_VERSION_ATLEAST(2, 0, 6))
    467         #endif
    468     #endif
    469 #endif
    470 
    471 /*-------------
    472  * Logging
    473  *-----------*/
    474 
    475 /*Enable the log module*/
    476 #ifndef LV_USE_LOG
    477     #ifdef CONFIG_LV_USE_LOG
    478         #define LV_USE_LOG CONFIG_LV_USE_LOG
    479     #else
    480         #define LV_USE_LOG 0
    481     #endif
    482 #endif
    483 #if LV_USE_LOG
    484 
    485     /*How important log should be added:
    486     *LV_LOG_LEVEL_TRACE       A lot of logs to give detailed information
    487     *LV_LOG_LEVEL_INFO        Log important events
    488     *LV_LOG_LEVEL_WARN        Log if something unwanted happened but didn't cause a problem
    489     *LV_LOG_LEVEL_ERROR       Only critical issue, when the system may fail
    490     *LV_LOG_LEVEL_USER        Only logs added by the user
    491     *LV_LOG_LEVEL_NONE        Do not log anything*/
    492     #ifndef LV_LOG_LEVEL
    493         #ifdef CONFIG_LV_LOG_LEVEL
    494             #define LV_LOG_LEVEL CONFIG_LV_LOG_LEVEL
    495         #else
    496             #define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
    497         #endif
    498     #endif
    499 
    500     /*1: Print the log with 'printf';
    501     *0: User need to register a callback with `lv_log_register_print_cb()`*/
    502     #ifndef LV_LOG_PRINTF
    503         #ifdef CONFIG_LV_LOG_PRINTF
    504             #define LV_LOG_PRINTF CONFIG_LV_LOG_PRINTF
    505         #else
    506             #define LV_LOG_PRINTF 0
    507         #endif
    508     #endif
    509 
    510     /*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/
    511     #ifndef LV_LOG_TRACE_MEM
    512         #ifdef _LV_KCONFIG_PRESENT
    513             #ifdef CONFIG_LV_LOG_TRACE_MEM
    514                 #define LV_LOG_TRACE_MEM CONFIG_LV_LOG_TRACE_MEM
    515             #else
    516                 #define LV_LOG_TRACE_MEM 0
    517             #endif
    518         #else
    519             #define LV_LOG_TRACE_MEM        1
    520         #endif
    521     #endif
    522     #ifndef LV_LOG_TRACE_TIMER
    523         #ifdef _LV_KCONFIG_PRESENT
    524             #ifdef CONFIG_LV_LOG_TRACE_TIMER
    525                 #define LV_LOG_TRACE_TIMER CONFIG_LV_LOG_TRACE_TIMER
    526             #else
    527                 #define LV_LOG_TRACE_TIMER 0
    528             #endif
    529         #else
    530             #define LV_LOG_TRACE_TIMER      1
    531         #endif
    532     #endif
    533     #ifndef LV_LOG_TRACE_INDEV
    534         #ifdef _LV_KCONFIG_PRESENT
    535             #ifdef CONFIG_LV_LOG_TRACE_INDEV
    536                 #define LV_LOG_TRACE_INDEV CONFIG_LV_LOG_TRACE_INDEV
    537             #else
    538                 #define LV_LOG_TRACE_INDEV 0
    539             #endif
    540         #else
    541             #define LV_LOG_TRACE_INDEV      1
    542         #endif
    543     #endif
    544     #ifndef LV_LOG_TRACE_DISP_REFR
    545         #ifdef _LV_KCONFIG_PRESENT
    546             #ifdef CONFIG_LV_LOG_TRACE_DISP_REFR
    547                 #define LV_LOG_TRACE_DISP_REFR CONFIG_LV_LOG_TRACE_DISP_REFR
    548             #else
    549                 #define LV_LOG_TRACE_DISP_REFR 0
    550             #endif
    551         #else
    552             #define LV_LOG_TRACE_DISP_REFR  1
    553         #endif
    554     #endif
    555     #ifndef LV_LOG_TRACE_EVENT
    556         #ifdef _LV_KCONFIG_PRESENT
    557             #ifdef CONFIG_LV_LOG_TRACE_EVENT
    558                 #define LV_LOG_TRACE_EVENT CONFIG_LV_LOG_TRACE_EVENT
    559             #else
    560                 #define LV_LOG_TRACE_EVENT 0
    561             #endif
    562         #else
    563             #define LV_LOG_TRACE_EVENT      1
    564         #endif
    565     #endif
    566     #ifndef LV_LOG_TRACE_OBJ_CREATE
    567         #ifdef _LV_KCONFIG_PRESENT
    568             #ifdef CONFIG_LV_LOG_TRACE_OBJ_CREATE
    569                 #define LV_LOG_TRACE_OBJ_CREATE CONFIG_LV_LOG_TRACE_OBJ_CREATE
    570             #else
    571                 #define LV_LOG_TRACE_OBJ_CREATE 0
    572             #endif
    573         #else
    574             #define LV_LOG_TRACE_OBJ_CREATE 1
    575         #endif
    576     #endif
    577     #ifndef LV_LOG_TRACE_LAYOUT
    578         #ifdef _LV_KCONFIG_PRESENT
    579             #ifdef CONFIG_LV_LOG_TRACE_LAYOUT
    580                 #define LV_LOG_TRACE_LAYOUT CONFIG_LV_LOG_TRACE_LAYOUT
    581             #else
    582                 #define LV_LOG_TRACE_LAYOUT 0
    583             #endif
    584         #else
    585             #define LV_LOG_TRACE_LAYOUT     1
    586         #endif
    587     #endif
    588     #ifndef LV_LOG_TRACE_ANIM
    589         #ifdef _LV_KCONFIG_PRESENT
    590             #ifdef CONFIG_LV_LOG_TRACE_ANIM
    591                 #define LV_LOG_TRACE_ANIM CONFIG_LV_LOG_TRACE_ANIM
    592             #else
    593                 #define LV_LOG_TRACE_ANIM 0
    594             #endif
    595         #else
    596             #define LV_LOG_TRACE_ANIM       1
    597         #endif
    598     #endif
    599 
    600 #endif  /*LV_USE_LOG*/
    601 
    602 /*-------------
    603  * Asserts
    604  *-----------*/
    605 
    606 /*Enable asserts if an operation is failed or an invalid data is found.
    607  *If LV_USE_LOG is enabled an error message will be printed on failure*/
    608 #ifndef LV_USE_ASSERT_NULL
    609     #ifdef _LV_KCONFIG_PRESENT
    610         #ifdef CONFIG_LV_USE_ASSERT_NULL
    611             #define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL
    612         #else
    613             #define LV_USE_ASSERT_NULL 0
    614         #endif
    615     #else
    616         #define LV_USE_ASSERT_NULL          1   /*Check if the parameter is NULL. (Very fast, recommended)*/
    617     #endif
    618 #endif
    619 #ifndef LV_USE_ASSERT_MALLOC
    620     #ifdef _LV_KCONFIG_PRESENT
    621         #ifdef CONFIG_LV_USE_ASSERT_MALLOC
    622             #define LV_USE_ASSERT_MALLOC CONFIG_LV_USE_ASSERT_MALLOC
    623         #else
    624             #define LV_USE_ASSERT_MALLOC 0
    625         #endif
    626     #else
    627         #define LV_USE_ASSERT_MALLOC        1   /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
    628     #endif
    629 #endif
    630 #ifndef LV_USE_ASSERT_STYLE
    631     #ifdef CONFIG_LV_USE_ASSERT_STYLE
    632         #define LV_USE_ASSERT_STYLE CONFIG_LV_USE_ASSERT_STYLE
    633     #else
    634         #define LV_USE_ASSERT_STYLE         0   /*Check if the styles are properly initialized. (Very fast, recommended)*/
    635     #endif
    636 #endif
    637 #ifndef LV_USE_ASSERT_MEM_INTEGRITY
    638     #ifdef CONFIG_LV_USE_ASSERT_MEM_INTEGRITY
    639         #define LV_USE_ASSERT_MEM_INTEGRITY CONFIG_LV_USE_ASSERT_MEM_INTEGRITY
    640     #else
    641         #define LV_USE_ASSERT_MEM_INTEGRITY 0   /*Check the integrity of `lv_mem` after critical operations. (Slow)*/
    642     #endif
    643 #endif
    644 #ifndef LV_USE_ASSERT_OBJ
    645     #ifdef CONFIG_LV_USE_ASSERT_OBJ
    646         #define LV_USE_ASSERT_OBJ CONFIG_LV_USE_ASSERT_OBJ
    647     #else
    648         #define LV_USE_ASSERT_OBJ           0   /*Check the object's type and existence (e.g. not deleted). (Slow)*/
    649     #endif
    650 #endif
    651 
    652 /*Add a custom handler when assert happens e.g. to restart the MCU*/
    653 #ifndef LV_ASSERT_HANDLER_INCLUDE
    654     #ifdef CONFIG_LV_ASSERT_HANDLER_INCLUDE
    655         #define LV_ASSERT_HANDLER_INCLUDE CONFIG_LV_ASSERT_HANDLER_INCLUDE
    656     #else
    657         #define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
    658     #endif
    659 #endif
    660 #ifndef LV_ASSERT_HANDLER
    661     #ifdef CONFIG_LV_ASSERT_HANDLER
    662         #define LV_ASSERT_HANDLER CONFIG_LV_ASSERT_HANDLER
    663     #else
    664         #define LV_ASSERT_HANDLER while(1);   /*Halt by default*/
    665     #endif
    666 #endif
    667 
    668 /*-------------
    669  * Others
    670  *-----------*/
    671 
    672 /*1: Show CPU usage and FPS count*/
    673 #ifndef LV_USE_PERF_MONITOR
    674     #ifdef CONFIG_LV_USE_PERF_MONITOR
    675         #define LV_USE_PERF_MONITOR CONFIG_LV_USE_PERF_MONITOR
    676     #else
    677         #define LV_USE_PERF_MONITOR 0
    678     #endif
    679 #endif
    680 #if LV_USE_PERF_MONITOR
    681     #ifndef LV_USE_PERF_MONITOR_POS
    682         #ifdef CONFIG_LV_USE_PERF_MONITOR_POS
    683             #define LV_USE_PERF_MONITOR_POS CONFIG_LV_USE_PERF_MONITOR_POS
    684         #else
    685             #define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
    686         #endif
    687     #endif
    688 #endif
    689 
    690 /*1: Show the used memory and the memory fragmentation
    691  * Requires LV_MEM_CUSTOM = 0*/
    692 #ifndef LV_USE_MEM_MONITOR
    693     #ifdef CONFIG_LV_USE_MEM_MONITOR
    694         #define LV_USE_MEM_MONITOR CONFIG_LV_USE_MEM_MONITOR
    695     #else
    696         #define LV_USE_MEM_MONITOR 0
    697     #endif
    698 #endif
    699 #if LV_USE_MEM_MONITOR
    700     #ifndef LV_USE_MEM_MONITOR_POS
    701         #ifdef CONFIG_LV_USE_MEM_MONITOR_POS
    702             #define LV_USE_MEM_MONITOR_POS CONFIG_LV_USE_MEM_MONITOR_POS
    703         #else
    704             #define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT
    705         #endif
    706     #endif
    707 #endif
    708 
    709 /*1: Draw random colored rectangles over the redrawn areas*/
    710 #ifndef LV_USE_REFR_DEBUG
    711     #ifdef CONFIG_LV_USE_REFR_DEBUG
    712         #define LV_USE_REFR_DEBUG CONFIG_LV_USE_REFR_DEBUG
    713     #else
    714         #define LV_USE_REFR_DEBUG 0
    715     #endif
    716 #endif
    717 
    718 /*Change the built in (v)snprintf functions*/
    719 #ifndef LV_SPRINTF_CUSTOM
    720     #ifdef CONFIG_LV_SPRINTF_CUSTOM
    721         #define LV_SPRINTF_CUSTOM CONFIG_LV_SPRINTF_CUSTOM
    722     #else
    723         #define LV_SPRINTF_CUSTOM 0
    724     #endif
    725 #endif
    726 #if LV_SPRINTF_CUSTOM
    727     #ifndef LV_SPRINTF_INCLUDE
    728         #ifdef CONFIG_LV_SPRINTF_INCLUDE
    729             #define LV_SPRINTF_INCLUDE CONFIG_LV_SPRINTF_INCLUDE
    730         #else
    731             #define LV_SPRINTF_INCLUDE <stdio.h>
    732         #endif
    733     #endif
    734     #ifndef lv_snprintf
    735         #ifdef CONFIG_LV_SNPRINTF
    736             #define lv_snprintf CONFIG_LV_SNPRINTF
    737         #else
    738             #define lv_snprintf  snprintf
    739         #endif
    740     #endif
    741     #ifndef lv_vsnprintf
    742         #ifdef CONFIG_LV_VSNPRINTF
    743             #define lv_vsnprintf CONFIG_LV_VSNPRINTF
    744         #else
    745             #define lv_vsnprintf vsnprintf
    746         #endif
    747     #endif
    748 #else   /*LV_SPRINTF_CUSTOM*/
    749     #ifndef LV_SPRINTF_USE_FLOAT
    750         #ifdef CONFIG_LV_SPRINTF_USE_FLOAT
    751             #define LV_SPRINTF_USE_FLOAT CONFIG_LV_SPRINTF_USE_FLOAT
    752         #else
    753             #define LV_SPRINTF_USE_FLOAT 0
    754         #endif
    755     #endif
    756 #endif  /*LV_SPRINTF_CUSTOM*/
    757 
    758 #ifndef LV_USE_USER_DATA
    759     #ifdef _LV_KCONFIG_PRESENT
    760         #ifdef CONFIG_LV_USE_USER_DATA
    761             #define LV_USE_USER_DATA CONFIG_LV_USE_USER_DATA
    762         #else
    763             #define LV_USE_USER_DATA 0
    764         #endif
    765     #else
    766         #define LV_USE_USER_DATA 1
    767     #endif
    768 #endif
    769 
    770 /*Garbage Collector settings
    771  *Used if lvgl is bound to higher level language and the memory is managed by that language*/
    772 #ifndef LV_ENABLE_GC
    773     #ifdef CONFIG_LV_ENABLE_GC
    774         #define LV_ENABLE_GC CONFIG_LV_ENABLE_GC
    775     #else
    776         #define LV_ENABLE_GC 0
    777     #endif
    778 #endif
    779 #if LV_ENABLE_GC != 0
    780     #ifndef LV_GC_INCLUDE
    781         #ifdef CONFIG_LV_GC_INCLUDE
    782             #define LV_GC_INCLUDE CONFIG_LV_GC_INCLUDE
    783         #else
    784             #define LV_GC_INCLUDE "gc.h"                           /*Include Garbage Collector related things*/
    785         #endif
    786     #endif
    787 #endif /*LV_ENABLE_GC*/
    788 
    789 /*=====================
    790  *  COMPILER SETTINGS
    791  *====================*/
    792 
    793 /*For big endian systems set to 1*/
    794 #ifndef LV_BIG_ENDIAN_SYSTEM
    795     #ifdef CONFIG_LV_BIG_ENDIAN_SYSTEM
    796         #define LV_BIG_ENDIAN_SYSTEM CONFIG_LV_BIG_ENDIAN_SYSTEM
    797     #else
    798         #define LV_BIG_ENDIAN_SYSTEM 0
    799     #endif
    800 #endif
    801 
    802 /*Define a custom attribute to `lv_tick_inc` function*/
    803 #ifndef LV_ATTRIBUTE_TICK_INC
    804     #ifdef CONFIG_LV_ATTRIBUTE_TICK_INC
    805         #define LV_ATTRIBUTE_TICK_INC CONFIG_LV_ATTRIBUTE_TICK_INC
    806     #else
    807         #define LV_ATTRIBUTE_TICK_INC
    808     #endif
    809 #endif
    810 
    811 /*Define a custom attribute to `lv_timer_handler` function*/
    812 #ifndef LV_ATTRIBUTE_TIMER_HANDLER
    813     #ifdef CONFIG_LV_ATTRIBUTE_TIMER_HANDLER
    814         #define LV_ATTRIBUTE_TIMER_HANDLER CONFIG_LV_ATTRIBUTE_TIMER_HANDLER
    815     #else
    816         #define LV_ATTRIBUTE_TIMER_HANDLER
    817     #endif
    818 #endif
    819 
    820 /*Define a custom attribute to `lv_disp_flush_ready` function*/
    821 #ifndef LV_ATTRIBUTE_FLUSH_READY
    822     #ifdef CONFIG_LV_ATTRIBUTE_FLUSH_READY
    823         #define LV_ATTRIBUTE_FLUSH_READY CONFIG_LV_ATTRIBUTE_FLUSH_READY
    824     #else
    825         #define LV_ATTRIBUTE_FLUSH_READY
    826     #endif
    827 #endif
    828 
    829 /*Required alignment size for buffers*/
    830 #ifndef LV_ATTRIBUTE_MEM_ALIGN_SIZE
    831     #ifdef _LV_KCONFIG_PRESENT
    832         #ifdef CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE
    833             #define LV_ATTRIBUTE_MEM_ALIGN_SIZE CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE
    834         #else
    835             #define LV_ATTRIBUTE_MEM_ALIGN_SIZE 0
    836         #endif
    837     #else
    838         #define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
    839     #endif
    840 #endif
    841 
    842 /*Will be added where memories needs to be aligned (with -Os data might not be aligned to boundary by default).
    843  * E.g. __attribute__((aligned(4)))*/
    844 #ifndef LV_ATTRIBUTE_MEM_ALIGN
    845     #ifdef CONFIG_LV_ATTRIBUTE_MEM_ALIGN
    846         #define LV_ATTRIBUTE_MEM_ALIGN CONFIG_LV_ATTRIBUTE_MEM_ALIGN
    847     #else
    848         #define LV_ATTRIBUTE_MEM_ALIGN
    849     #endif
    850 #endif
    851 
    852 /*Attribute to mark large constant arrays for example font's bitmaps*/
    853 #ifndef LV_ATTRIBUTE_LARGE_CONST
    854     #ifdef CONFIG_LV_ATTRIBUTE_LARGE_CONST
    855         #define LV_ATTRIBUTE_LARGE_CONST CONFIG_LV_ATTRIBUTE_LARGE_CONST
    856     #else
    857         #define LV_ATTRIBUTE_LARGE_CONST
    858     #endif
    859 #endif
    860 
    861 /*Compiler prefix for a big array declaration in RAM*/
    862 #ifndef LV_ATTRIBUTE_LARGE_RAM_ARRAY
    863     #ifdef CONFIG_LV_ATTRIBUTE_LARGE_RAM_ARRAY
    864         #define LV_ATTRIBUTE_LARGE_RAM_ARRAY CONFIG_LV_ATTRIBUTE_LARGE_RAM_ARRAY
    865     #else
    866         #define LV_ATTRIBUTE_LARGE_RAM_ARRAY
    867     #endif
    868 #endif
    869 
    870 /*Place performance critical functions into a faster memory (e.g RAM)*/
    871 #ifndef LV_ATTRIBUTE_FAST_MEM
    872     #ifdef CONFIG_LV_ATTRIBUTE_FAST_MEM
    873         #define LV_ATTRIBUTE_FAST_MEM CONFIG_LV_ATTRIBUTE_FAST_MEM
    874     #else
    875         #define LV_ATTRIBUTE_FAST_MEM
    876     #endif
    877 #endif
    878 
    879 /*Prefix variables that are used in GPU accelerated operations, often these need to be placed in RAM sections that are DMA accessible*/
    880 #ifndef LV_ATTRIBUTE_DMA
    881     #ifdef CONFIG_LV_ATTRIBUTE_DMA
    882         #define LV_ATTRIBUTE_DMA CONFIG_LV_ATTRIBUTE_DMA
    883     #else
    884         #define LV_ATTRIBUTE_DMA
    885     #endif
    886 #endif
    887 
    888 /*Export integer constant to binding. This macro is used with constants in the form of LV_<CONST> that
    889  *should also appear on LVGL binding API such as Micropython.*/
    890 #ifndef LV_EXPORT_CONST_INT
    891     #ifdef CONFIG_LV_EXPORT_CONST_INT
    892         #define LV_EXPORT_CONST_INT CONFIG_LV_EXPORT_CONST_INT
    893     #else
    894         #define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/
    895     #endif
    896 #endif
    897 
    898 /*Extend the default -32k..32k coordinate range to -4M..4M by using int32_t for coordinates instead of int16_t*/
    899 #ifndef LV_USE_LARGE_COORD
    900     #ifdef CONFIG_LV_USE_LARGE_COORD
    901         #define LV_USE_LARGE_COORD CONFIG_LV_USE_LARGE_COORD
    902     #else
    903         #define LV_USE_LARGE_COORD 0
    904     #endif
    905 #endif
    906 
    907 /*==================
    908  *   FONT USAGE
    909  *===================*/
    910 
    911 /*Montserrat fonts with ASCII range and some symbols using bpp = 4
    912  *https://fonts.google.com/specimen/Montserrat*/
    913 #ifndef LV_FONT_MONTSERRAT_8
    914     #ifdef CONFIG_LV_FONT_MONTSERRAT_8
    915         #define LV_FONT_MONTSERRAT_8 CONFIG_LV_FONT_MONTSERRAT_8
    916     #else
    917         #define LV_FONT_MONTSERRAT_8  0
    918     #endif
    919 #endif
    920 #ifndef LV_FONT_MONTSERRAT_10
    921     #ifdef CONFIG_LV_FONT_MONTSERRAT_10
    922         #define LV_FONT_MONTSERRAT_10 CONFIG_LV_FONT_MONTSERRAT_10
    923     #else
    924         #define LV_FONT_MONTSERRAT_10 0
    925     #endif
    926 #endif
    927 #ifndef LV_FONT_MONTSERRAT_12
    928     #ifdef CONFIG_LV_FONT_MONTSERRAT_12
    929         #define LV_FONT_MONTSERRAT_12 CONFIG_LV_FONT_MONTSERRAT_12
    930     #else
    931         #define LV_FONT_MONTSERRAT_12 0
    932     #endif
    933 #endif
    934 #ifndef LV_FONT_MONTSERRAT_14
    935     #ifdef _LV_KCONFIG_PRESENT
    936         #ifdef CONFIG_LV_FONT_MONTSERRAT_14
    937             #define LV_FONT_MONTSERRAT_14 CONFIG_LV_FONT_MONTSERRAT_14
    938         #else
    939             #define LV_FONT_MONTSERRAT_14 0
    940         #endif
    941     #else
    942         #define LV_FONT_MONTSERRAT_14 1
    943     #endif
    944 #endif
    945 #ifndef LV_FONT_MONTSERRAT_16
    946     #ifdef CONFIG_LV_FONT_MONTSERRAT_16
    947         #define LV_FONT_MONTSERRAT_16 CONFIG_LV_FONT_MONTSERRAT_16
    948     #else
    949         #define LV_FONT_MONTSERRAT_16 0
    950     #endif
    951 #endif
    952 #ifndef LV_FONT_MONTSERRAT_18
    953     #ifdef CONFIG_LV_FONT_MONTSERRAT_18
    954         #define LV_FONT_MONTSERRAT_18 CONFIG_LV_FONT_MONTSERRAT_18
    955     #else
    956         #define LV_FONT_MONTSERRAT_18 0
    957     #endif
    958 #endif
    959 #ifndef LV_FONT_MONTSERRAT_20
    960     #ifdef CONFIG_LV_FONT_MONTSERRAT_20
    961         #define LV_FONT_MONTSERRAT_20 CONFIG_LV_FONT_MONTSERRAT_20
    962     #else
    963         #define LV_FONT_MONTSERRAT_20 0
    964     #endif
    965 #endif
    966 #ifndef LV_FONT_MONTSERRAT_22
    967     #ifdef CONFIG_LV_FONT_MONTSERRAT_22
    968         #define LV_FONT_MONTSERRAT_22 CONFIG_LV_FONT_MONTSERRAT_22
    969     #else
    970         #define LV_FONT_MONTSERRAT_22 0
    971     #endif
    972 #endif
    973 #ifndef LV_FONT_MONTSERRAT_24
    974     #ifdef CONFIG_LV_FONT_MONTSERRAT_24
    975         #define LV_FONT_MONTSERRAT_24 CONFIG_LV_FONT_MONTSERRAT_24
    976     #else
    977         #define LV_FONT_MONTSERRAT_24 0
    978     #endif
    979 #endif
    980 #ifndef LV_FONT_MONTSERRAT_26
    981     #ifdef CONFIG_LV_FONT_MONTSERRAT_26
    982         #define LV_FONT_MONTSERRAT_26 CONFIG_LV_FONT_MONTSERRAT_26
    983     #else
    984         #define LV_FONT_MONTSERRAT_26 0
    985     #endif
    986 #endif
    987 #ifndef LV_FONT_MONTSERRAT_28
    988     #ifdef CONFIG_LV_FONT_MONTSERRAT_28
    989         #define LV_FONT_MONTSERRAT_28 CONFIG_LV_FONT_MONTSERRAT_28
    990     #else
    991         #define LV_FONT_MONTSERRAT_28 0
    992     #endif
    993 #endif
    994 #ifndef LV_FONT_MONTSERRAT_30
    995     #ifdef CONFIG_LV_FONT_MONTSERRAT_30
    996         #define LV_FONT_MONTSERRAT_30 CONFIG_LV_FONT_MONTSERRAT_30
    997     #else
    998         #define LV_FONT_MONTSERRAT_30 0
    999     #endif
   1000 #endif
   1001 #ifndef LV_FONT_MONTSERRAT_32
   1002     #ifdef CONFIG_LV_FONT_MONTSERRAT_32
   1003         #define LV_FONT_MONTSERRAT_32 CONFIG_LV_FONT_MONTSERRAT_32
   1004     #else
   1005         #define LV_FONT_MONTSERRAT_32 0
   1006     #endif
   1007 #endif
   1008 #ifndef LV_FONT_MONTSERRAT_34
   1009     #ifdef CONFIG_LV_FONT_MONTSERRAT_34
   1010         #define LV_FONT_MONTSERRAT_34 CONFIG_LV_FONT_MONTSERRAT_34
   1011     #else
   1012         #define LV_FONT_MONTSERRAT_34 0
   1013     #endif
   1014 #endif
   1015 #ifndef LV_FONT_MONTSERRAT_36
   1016     #ifdef CONFIG_LV_FONT_MONTSERRAT_36
   1017         #define LV_FONT_MONTSERRAT_36 CONFIG_LV_FONT_MONTSERRAT_36
   1018     #else
   1019         #define LV_FONT_MONTSERRAT_36 0
   1020     #endif
   1021 #endif
   1022 #ifndef LV_FONT_MONTSERRAT_38
   1023     #ifdef CONFIG_LV_FONT_MONTSERRAT_38
   1024         #define LV_FONT_MONTSERRAT_38 CONFIG_LV_FONT_MONTSERRAT_38
   1025     #else
   1026         #define LV_FONT_MONTSERRAT_38 0
   1027     #endif
   1028 #endif
   1029 #ifndef LV_FONT_MONTSERRAT_40
   1030     #ifdef CONFIG_LV_FONT_MONTSERRAT_40
   1031         #define LV_FONT_MONTSERRAT_40 CONFIG_LV_FONT_MONTSERRAT_40
   1032     #else
   1033         #define LV_FONT_MONTSERRAT_40 0
   1034     #endif
   1035 #endif
   1036 #ifndef LV_FONT_MONTSERRAT_42
   1037     #ifdef CONFIG_LV_FONT_MONTSERRAT_42
   1038         #define LV_FONT_MONTSERRAT_42 CONFIG_LV_FONT_MONTSERRAT_42
   1039     #else
   1040         #define LV_FONT_MONTSERRAT_42 0
   1041     #endif
   1042 #endif
   1043 #ifndef LV_FONT_MONTSERRAT_44
   1044     #ifdef CONFIG_LV_FONT_MONTSERRAT_44
   1045         #define LV_FONT_MONTSERRAT_44 CONFIG_LV_FONT_MONTSERRAT_44
   1046     #else
   1047         #define LV_FONT_MONTSERRAT_44 0
   1048     #endif
   1049 #endif
   1050 #ifndef LV_FONT_MONTSERRAT_46
   1051     #ifdef CONFIG_LV_FONT_MONTSERRAT_46
   1052         #define LV_FONT_MONTSERRAT_46 CONFIG_LV_FONT_MONTSERRAT_46
   1053     #else
   1054         #define LV_FONT_MONTSERRAT_46 0
   1055     #endif
   1056 #endif
   1057 #ifndef LV_FONT_MONTSERRAT_48
   1058     #ifdef CONFIG_LV_FONT_MONTSERRAT_48
   1059         #define LV_FONT_MONTSERRAT_48 CONFIG_LV_FONT_MONTSERRAT_48
   1060     #else
   1061         #define LV_FONT_MONTSERRAT_48 0
   1062     #endif
   1063 #endif
   1064 
   1065 /*Demonstrate special features*/
   1066 #ifndef LV_FONT_MONTSERRAT_12_SUBPX
   1067     #ifdef CONFIG_LV_FONT_MONTSERRAT_12_SUBPX
   1068         #define LV_FONT_MONTSERRAT_12_SUBPX CONFIG_LV_FONT_MONTSERRAT_12_SUBPX
   1069     #else
   1070         #define LV_FONT_MONTSERRAT_12_SUBPX      0
   1071     #endif
   1072 #endif
   1073 #ifndef LV_FONT_MONTSERRAT_28_COMPRESSED
   1074     #ifdef CONFIG_LV_FONT_MONTSERRAT_28_COMPRESSED
   1075         #define LV_FONT_MONTSERRAT_28_COMPRESSED CONFIG_LV_FONT_MONTSERRAT_28_COMPRESSED
   1076     #else
   1077         #define LV_FONT_MONTSERRAT_28_COMPRESSED 0  /*bpp = 3*/
   1078     #endif
   1079 #endif
   1080 #ifndef LV_FONT_DEJAVU_16_PERSIAN_HEBREW
   1081     #ifdef CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW
   1082         #define LV_FONT_DEJAVU_16_PERSIAN_HEBREW CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW
   1083     #else
   1084         #define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0  /*Hebrew, Arabic, Persian letters and all their forms*/
   1085     #endif
   1086 #endif
   1087 #ifndef LV_FONT_SIMSUN_16_CJK
   1088     #ifdef CONFIG_LV_FONT_SIMSUN_16_CJK
   1089         #define LV_FONT_SIMSUN_16_CJK CONFIG_LV_FONT_SIMSUN_16_CJK
   1090     #else
   1091         #define LV_FONT_SIMSUN_16_CJK            0  /*1000 most common CJK radicals*/
   1092     #endif
   1093 #endif
   1094 
   1095 /*Pixel perfect monospace fonts*/
   1096 #ifndef LV_FONT_UNSCII_8
   1097     #ifdef CONFIG_LV_FONT_UNSCII_8
   1098         #define LV_FONT_UNSCII_8 CONFIG_LV_FONT_UNSCII_8
   1099     #else
   1100         #define LV_FONT_UNSCII_8  0
   1101     #endif
   1102 #endif
   1103 #ifndef LV_FONT_UNSCII_16
   1104     #ifdef CONFIG_LV_FONT_UNSCII_16
   1105         #define LV_FONT_UNSCII_16 CONFIG_LV_FONT_UNSCII_16
   1106     #else
   1107         #define LV_FONT_UNSCII_16 0
   1108     #endif
   1109 #endif
   1110 
   1111 /*Optionally declare custom fonts here.
   1112  *You can use these fonts as default font too and they will be available globally.
   1113  *E.g. #define LV_FONT_CUSTOM_DECLARE   LV_FONT_DECLARE(my_font_1) LV_FONT_DECLARE(my_font_2)*/
   1114 #ifndef LV_FONT_CUSTOM_DECLARE
   1115     #ifdef CONFIG_LV_FONT_CUSTOM_DECLARE
   1116         #define LV_FONT_CUSTOM_DECLARE CONFIG_LV_FONT_CUSTOM_DECLARE
   1117     #else
   1118         #define LV_FONT_CUSTOM_DECLARE
   1119     #endif
   1120 #endif
   1121 
   1122 /*Always set a default font*/
   1123 #ifndef LV_FONT_DEFAULT
   1124     #ifdef CONFIG_LV_FONT_DEFAULT
   1125         #define LV_FONT_DEFAULT CONFIG_LV_FONT_DEFAULT
   1126     #else
   1127         #define LV_FONT_DEFAULT &lv_font_montserrat_14
   1128     #endif
   1129 #endif
   1130 
   1131 /*Enable handling large font and/or fonts with a lot of characters.
   1132  *The limit depends on the font size, font face and bpp.
   1133  *Compiler error will be triggered if a font needs it.*/
   1134 #ifndef LV_FONT_FMT_TXT_LARGE
   1135     #ifdef CONFIG_LV_FONT_FMT_TXT_LARGE
   1136         #define LV_FONT_FMT_TXT_LARGE CONFIG_LV_FONT_FMT_TXT_LARGE
   1137     #else
   1138         #define LV_FONT_FMT_TXT_LARGE 0
   1139     #endif
   1140 #endif
   1141 
   1142 /*Enables/disables support for compressed fonts.*/
   1143 #ifndef LV_USE_FONT_COMPRESSED
   1144     #ifdef CONFIG_LV_USE_FONT_COMPRESSED
   1145         #define LV_USE_FONT_COMPRESSED CONFIG_LV_USE_FONT_COMPRESSED
   1146     #else
   1147         #define LV_USE_FONT_COMPRESSED 0
   1148     #endif
   1149 #endif
   1150 
   1151 /*Enable subpixel rendering*/
   1152 #ifndef LV_USE_FONT_SUBPX
   1153     #ifdef CONFIG_LV_USE_FONT_SUBPX
   1154         #define LV_USE_FONT_SUBPX CONFIG_LV_USE_FONT_SUBPX
   1155     #else
   1156         #define LV_USE_FONT_SUBPX 0
   1157     #endif
   1158 #endif
   1159 #if LV_USE_FONT_SUBPX
   1160     /*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/
   1161     #ifndef LV_FONT_SUBPX_BGR
   1162         #ifdef CONFIG_LV_FONT_SUBPX_BGR
   1163             #define LV_FONT_SUBPX_BGR CONFIG_LV_FONT_SUBPX_BGR
   1164         #else
   1165             #define LV_FONT_SUBPX_BGR 0  /*0: RGB; 1:BGR order*/
   1166         #endif
   1167     #endif
   1168 #endif
   1169 
   1170 /*=================
   1171  *  TEXT SETTINGS
   1172  *=================*/
   1173 
   1174 /**
   1175  * Select a character encoding for strings.
   1176  * Your IDE or editor should have the same character encoding
   1177  * - LV_TXT_ENC_UTF8
   1178  * - LV_TXT_ENC_ASCII
   1179  */
   1180 #ifndef LV_TXT_ENC
   1181     #ifdef CONFIG_LV_TXT_ENC
   1182         #define LV_TXT_ENC CONFIG_LV_TXT_ENC
   1183     #else
   1184         #define LV_TXT_ENC LV_TXT_ENC_UTF8
   1185     #endif
   1186 #endif
   1187 
   1188 /*Can break (wrap) texts on these chars*/
   1189 #ifndef LV_TXT_BREAK_CHARS
   1190     #ifdef CONFIG_LV_TXT_BREAK_CHARS
   1191         #define LV_TXT_BREAK_CHARS CONFIG_LV_TXT_BREAK_CHARS
   1192     #else
   1193         #define LV_TXT_BREAK_CHARS " ,.;:-_"
   1194     #endif
   1195 #endif
   1196 
   1197 /*If a word is at least this long, will break wherever "prettiest"
   1198  *To disable, set to a value <= 0*/
   1199 #ifndef LV_TXT_LINE_BREAK_LONG_LEN
   1200     #ifdef CONFIG_LV_TXT_LINE_BREAK_LONG_LEN
   1201         #define LV_TXT_LINE_BREAK_LONG_LEN CONFIG_LV_TXT_LINE_BREAK_LONG_LEN
   1202     #else
   1203         #define LV_TXT_LINE_BREAK_LONG_LEN 0
   1204     #endif
   1205 #endif
   1206 
   1207 /*Minimum number of characters in a long word to put on a line before a break.
   1208  *Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
   1209 #ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN
   1210     #ifdef CONFIG_LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN
   1211         #define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN CONFIG_LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN
   1212     #else
   1213         #define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
   1214     #endif
   1215 #endif
   1216 
   1217 /*Minimum number of characters in a long word to put on a line after a break.
   1218  *Depends on LV_TXT_LINE_BREAK_LONG_LEN.*/
   1219 #ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN
   1220     #ifdef CONFIG_LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN
   1221         #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN CONFIG_LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN
   1222     #else
   1223         #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
   1224     #endif
   1225 #endif
   1226 
   1227 /*The control character to use for signalling text recoloring.*/
   1228 #ifndef LV_TXT_COLOR_CMD
   1229     #ifdef CONFIG_LV_TXT_COLOR_CMD
   1230         #define LV_TXT_COLOR_CMD CONFIG_LV_TXT_COLOR_CMD
   1231     #else
   1232         #define LV_TXT_COLOR_CMD "#"
   1233     #endif
   1234 #endif
   1235 
   1236 /*Support bidirectional texts. Allows mixing Left-to-Right and Right-to-Left texts.
   1237  *The direction will be processed according to the Unicode Bidirectional Algorithm:
   1238  *https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
   1239 #ifndef LV_USE_BIDI
   1240     #ifdef CONFIG_LV_USE_BIDI
   1241         #define LV_USE_BIDI CONFIG_LV_USE_BIDI
   1242     #else
   1243         #define LV_USE_BIDI 0
   1244     #endif
   1245 #endif
   1246 #if LV_USE_BIDI
   1247     /*Set the default direction. Supported values:
   1248     *`LV_BASE_DIR_LTR` Left-to-Right
   1249     *`LV_BASE_DIR_RTL` Right-to-Left
   1250     *`LV_BASE_DIR_AUTO` detect texts base direction*/
   1251     #ifndef LV_BIDI_BASE_DIR_DEF
   1252         #ifdef CONFIG_LV_BIDI_BASE_DIR_DEF
   1253             #define LV_BIDI_BASE_DIR_DEF CONFIG_LV_BIDI_BASE_DIR_DEF
   1254         #else
   1255             #define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
   1256         #endif
   1257     #endif
   1258 #endif
   1259 
   1260 /*Enable Arabic/Persian processing
   1261  *In these languages characters should be replaced with an other form based on their position in the text*/
   1262 #ifndef LV_USE_ARABIC_PERSIAN_CHARS
   1263     #ifdef CONFIG_LV_USE_ARABIC_PERSIAN_CHARS
   1264         #define LV_USE_ARABIC_PERSIAN_CHARS CONFIG_LV_USE_ARABIC_PERSIAN_CHARS
   1265     #else
   1266         #define LV_USE_ARABIC_PERSIAN_CHARS 0
   1267     #endif
   1268 #endif
   1269 
   1270 /*==================
   1271  *  WIDGET USAGE
   1272  *================*/
   1273 
   1274 /*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html*/
   1275 
   1276 #ifndef LV_USE_ARC
   1277     #ifdef _LV_KCONFIG_PRESENT
   1278         #ifdef CONFIG_LV_USE_ARC
   1279             #define LV_USE_ARC CONFIG_LV_USE_ARC
   1280         #else
   1281             #define LV_USE_ARC 0
   1282         #endif
   1283     #else
   1284         #define LV_USE_ARC        1
   1285     #endif
   1286 #endif
   1287 
   1288 #ifndef LV_USE_ANIMIMG
   1289     #ifdef _LV_KCONFIG_PRESENT
   1290         #ifdef CONFIG_LV_USE_ANIMIMG
   1291             #define LV_USE_ANIMIMG CONFIG_LV_USE_ANIMIMG
   1292         #else
   1293             #define LV_USE_ANIMIMG 0
   1294         #endif
   1295     #else
   1296         #define LV_USE_ANIMIMG    1
   1297     #endif
   1298 #endif
   1299 
   1300 #ifndef LV_USE_BAR
   1301     #ifdef _LV_KCONFIG_PRESENT
   1302         #ifdef CONFIG_LV_USE_BAR
   1303             #define LV_USE_BAR CONFIG_LV_USE_BAR
   1304         #else
   1305             #define LV_USE_BAR 0
   1306         #endif
   1307     #else
   1308         #define LV_USE_BAR        1
   1309     #endif
   1310 #endif
   1311 
   1312 #ifndef LV_USE_BTN
   1313     #ifdef _LV_KCONFIG_PRESENT
   1314         #ifdef CONFIG_LV_USE_BTN
   1315             #define LV_USE_BTN CONFIG_LV_USE_BTN
   1316         #else
   1317             #define LV_USE_BTN 0
   1318         #endif
   1319     #else
   1320         #define LV_USE_BTN        1
   1321     #endif
   1322 #endif
   1323 
   1324 #ifndef LV_USE_BTNMATRIX
   1325     #ifdef _LV_KCONFIG_PRESENT
   1326         #ifdef CONFIG_LV_USE_BTNMATRIX
   1327             #define LV_USE_BTNMATRIX CONFIG_LV_USE_BTNMATRIX
   1328         #else
   1329             #define LV_USE_BTNMATRIX 0
   1330         #endif
   1331     #else
   1332         #define LV_USE_BTNMATRIX  1
   1333     #endif
   1334 #endif
   1335 
   1336 #ifndef LV_USE_CANVAS
   1337     #ifdef _LV_KCONFIG_PRESENT
   1338         #ifdef CONFIG_LV_USE_CANVAS
   1339             #define LV_USE_CANVAS CONFIG_LV_USE_CANVAS
   1340         #else
   1341             #define LV_USE_CANVAS 0
   1342         #endif
   1343     #else
   1344         #define LV_USE_CANVAS     1
   1345     #endif
   1346 #endif
   1347 
   1348 #ifndef LV_USE_CHECKBOX
   1349     #ifdef _LV_KCONFIG_PRESENT
   1350         #ifdef CONFIG_LV_USE_CHECKBOX
   1351             #define LV_USE_CHECKBOX CONFIG_LV_USE_CHECKBOX
   1352         #else
   1353             #define LV_USE_CHECKBOX 0
   1354         #endif
   1355     #else
   1356         #define LV_USE_CHECKBOX   1
   1357     #endif
   1358 #endif
   1359 
   1360 #ifndef LV_USE_DROPDOWN
   1361     #ifdef _LV_KCONFIG_PRESENT
   1362         #ifdef CONFIG_LV_USE_DROPDOWN
   1363             #define LV_USE_DROPDOWN CONFIG_LV_USE_DROPDOWN
   1364         #else
   1365             #define LV_USE_DROPDOWN 0
   1366         #endif
   1367     #else
   1368         #define LV_USE_DROPDOWN   1   /*Requires: lv_label*/
   1369     #endif
   1370 #endif
   1371 
   1372 #ifndef LV_USE_IMG
   1373     #ifdef _LV_KCONFIG_PRESENT
   1374         #ifdef CONFIG_LV_USE_IMG
   1375             #define LV_USE_IMG CONFIG_LV_USE_IMG
   1376         #else
   1377             #define LV_USE_IMG 0
   1378         #endif
   1379     #else
   1380         #define LV_USE_IMG        1   /*Requires: lv_label*/
   1381     #endif
   1382 #endif
   1383 
   1384 #ifndef LV_USE_LABEL
   1385     #ifdef _LV_KCONFIG_PRESENT
   1386         #ifdef CONFIG_LV_USE_LABEL
   1387             #define LV_USE_LABEL CONFIG_LV_USE_LABEL
   1388         #else
   1389             #define LV_USE_LABEL 0
   1390         #endif
   1391     #else
   1392         #define LV_USE_LABEL      1
   1393     #endif
   1394 #endif
   1395 #if LV_USE_LABEL
   1396     #ifndef LV_LABEL_TEXT_SELECTION
   1397         #ifdef _LV_KCONFIG_PRESENT
   1398             #ifdef CONFIG_LV_LABEL_TEXT_SELECTION
   1399                 #define LV_LABEL_TEXT_SELECTION CONFIG_LV_LABEL_TEXT_SELECTION
   1400             #else
   1401                 #define LV_LABEL_TEXT_SELECTION 0
   1402             #endif
   1403         #else
   1404             #define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/
   1405         #endif
   1406     #endif
   1407     #ifndef LV_LABEL_LONG_TXT_HINT
   1408         #ifdef _LV_KCONFIG_PRESENT
   1409             #ifdef CONFIG_LV_LABEL_LONG_TXT_HINT
   1410                 #define LV_LABEL_LONG_TXT_HINT CONFIG_LV_LABEL_LONG_TXT_HINT
   1411             #else
   1412                 #define LV_LABEL_LONG_TXT_HINT 0
   1413             #endif
   1414         #else
   1415             #define LV_LABEL_LONG_TXT_HINT 1  /*Store some extra info in labels to speed up drawing of very long texts*/
   1416         #endif
   1417     #endif
   1418 #endif
   1419 
   1420 #ifndef LV_USE_LINE
   1421     #ifdef _LV_KCONFIG_PRESENT
   1422         #ifdef CONFIG_LV_USE_LINE
   1423             #define LV_USE_LINE CONFIG_LV_USE_LINE
   1424         #else
   1425             #define LV_USE_LINE 0
   1426         #endif
   1427     #else
   1428         #define LV_USE_LINE       1
   1429     #endif
   1430 #endif
   1431 
   1432 #ifndef LV_USE_ROLLER
   1433     #ifdef _LV_KCONFIG_PRESENT
   1434         #ifdef CONFIG_LV_USE_ROLLER
   1435             #define LV_USE_ROLLER CONFIG_LV_USE_ROLLER
   1436         #else
   1437             #define LV_USE_ROLLER 0
   1438         #endif
   1439     #else
   1440         #define LV_USE_ROLLER     1   /*Requires: lv_label*/
   1441     #endif
   1442 #endif
   1443 #if LV_USE_ROLLER
   1444     #ifndef LV_ROLLER_INF_PAGES
   1445         #ifdef CONFIG_LV_ROLLER_INF_PAGES
   1446             #define LV_ROLLER_INF_PAGES CONFIG_LV_ROLLER_INF_PAGES
   1447         #else
   1448             #define LV_ROLLER_INF_PAGES 7 /*Number of extra "pages" when the roller is infinite*/
   1449         #endif
   1450     #endif
   1451 #endif
   1452 
   1453 #ifndef LV_USE_SLIDER
   1454     #ifdef _LV_KCONFIG_PRESENT
   1455         #ifdef CONFIG_LV_USE_SLIDER
   1456             #define LV_USE_SLIDER CONFIG_LV_USE_SLIDER
   1457         #else
   1458             #define LV_USE_SLIDER 0
   1459         #endif
   1460     #else
   1461         #define LV_USE_SLIDER     1   /*Requires: lv_bar*/
   1462     #endif
   1463 #endif
   1464 
   1465 #ifndef LV_USE_SWITCH
   1466     #ifdef _LV_KCONFIG_PRESENT
   1467         #ifdef CONFIG_LV_USE_SWITCH
   1468             #define LV_USE_SWITCH CONFIG_LV_USE_SWITCH
   1469         #else
   1470             #define LV_USE_SWITCH 0
   1471         #endif
   1472     #else
   1473         #define LV_USE_SWITCH     1
   1474     #endif
   1475 #endif
   1476 
   1477 #ifndef LV_USE_TEXTAREA
   1478     #ifdef _LV_KCONFIG_PRESENT
   1479         #ifdef CONFIG_LV_USE_TEXTAREA
   1480             #define LV_USE_TEXTAREA CONFIG_LV_USE_TEXTAREA
   1481         #else
   1482             #define LV_USE_TEXTAREA 0
   1483         #endif
   1484     #else
   1485         #define LV_USE_TEXTAREA   1   /*Requires: lv_label*/
   1486     #endif
   1487 #endif
   1488 #if LV_USE_TEXTAREA != 0
   1489     #ifndef LV_TEXTAREA_DEF_PWD_SHOW_TIME
   1490         #ifdef CONFIG_LV_TEXTAREA_DEF_PWD_SHOW_TIME
   1491             #define LV_TEXTAREA_DEF_PWD_SHOW_TIME CONFIG_LV_TEXTAREA_DEF_PWD_SHOW_TIME
   1492         #else
   1493             #define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500    /*ms*/
   1494         #endif
   1495     #endif
   1496 #endif
   1497 
   1498 #ifndef LV_USE_TABLE
   1499     #ifdef _LV_KCONFIG_PRESENT
   1500         #ifdef CONFIG_LV_USE_TABLE
   1501             #define LV_USE_TABLE CONFIG_LV_USE_TABLE
   1502         #else
   1503             #define LV_USE_TABLE 0
   1504         #endif
   1505     #else
   1506         #define LV_USE_TABLE      1
   1507     #endif
   1508 #endif
   1509 
   1510 /*==================
   1511  * EXTRA COMPONENTS
   1512  *==================*/
   1513 
   1514 /*-----------
   1515  * Widgets
   1516  *----------*/
   1517 #ifndef LV_USE_CALENDAR
   1518     #ifdef _LV_KCONFIG_PRESENT
   1519         #ifdef CONFIG_LV_USE_CALENDAR
   1520             #define LV_USE_CALENDAR CONFIG_LV_USE_CALENDAR
   1521         #else
   1522             #define LV_USE_CALENDAR 0
   1523         #endif
   1524     #else
   1525         #define LV_USE_CALENDAR   1
   1526     #endif
   1527 #endif
   1528 #if LV_USE_CALENDAR
   1529     #ifndef LV_CALENDAR_WEEK_STARTS_MONDAY
   1530         #ifdef CONFIG_LV_CALENDAR_WEEK_STARTS_MONDAY
   1531             #define LV_CALENDAR_WEEK_STARTS_MONDAY CONFIG_LV_CALENDAR_WEEK_STARTS_MONDAY
   1532         #else
   1533             #define LV_CALENDAR_WEEK_STARTS_MONDAY 0
   1534         #endif
   1535     #endif
   1536     #if LV_CALENDAR_WEEK_STARTS_MONDAY
   1537         #ifndef LV_CALENDAR_DEFAULT_DAY_NAMES
   1538             #ifdef CONFIG_LV_CALENDAR_DEFAULT_DAY_NAMES
   1539                 #define LV_CALENDAR_DEFAULT_DAY_NAMES CONFIG_LV_CALENDAR_DEFAULT_DAY_NAMES
   1540             #else
   1541                 #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"}
   1542             #endif
   1543         #endif
   1544     #else
   1545         #ifndef LV_CALENDAR_DEFAULT_DAY_NAMES
   1546             #ifdef CONFIG_LV_CALENDAR_DEFAULT_DAY_NAMES
   1547                 #define LV_CALENDAR_DEFAULT_DAY_NAMES CONFIG_LV_CALENDAR_DEFAULT_DAY_NAMES
   1548             #else
   1549                 #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}
   1550             #endif
   1551         #endif
   1552     #endif
   1553 
   1554     #ifndef LV_CALENDAR_DEFAULT_MONTH_NAMES
   1555         #ifdef CONFIG_LV_CALENDAR_DEFAULT_MONTH_NAMES
   1556             #define LV_CALENDAR_DEFAULT_MONTH_NAMES CONFIG_LV_CALENDAR_DEFAULT_MONTH_NAMES
   1557         #else
   1558             #define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March",  "April", "May",  "June", "July", "August", "September", "October", "November", "December"}
   1559         #endif
   1560     #endif
   1561     #ifndef LV_USE_CALENDAR_HEADER_ARROW
   1562         #ifdef _LV_KCONFIG_PRESENT
   1563             #ifdef CONFIG_LV_USE_CALENDAR_HEADER_ARROW
   1564                 #define LV_USE_CALENDAR_HEADER_ARROW CONFIG_LV_USE_CALENDAR_HEADER_ARROW
   1565             #else
   1566                 #define LV_USE_CALENDAR_HEADER_ARROW 0
   1567             #endif
   1568         #else
   1569             #define LV_USE_CALENDAR_HEADER_ARROW 1
   1570         #endif
   1571     #endif
   1572     #ifndef LV_USE_CALENDAR_HEADER_DROPDOWN
   1573         #ifdef _LV_KCONFIG_PRESENT
   1574             #ifdef CONFIG_LV_USE_CALENDAR_HEADER_DROPDOWN
   1575                 #define LV_USE_CALENDAR_HEADER_DROPDOWN CONFIG_LV_USE_CALENDAR_HEADER_DROPDOWN
   1576             #else
   1577                 #define LV_USE_CALENDAR_HEADER_DROPDOWN 0
   1578             #endif
   1579         #else
   1580             #define LV_USE_CALENDAR_HEADER_DROPDOWN 1
   1581         #endif
   1582     #endif
   1583 #endif  /*LV_USE_CALENDAR*/
   1584 
   1585 #ifndef LV_USE_CHART
   1586     #ifdef _LV_KCONFIG_PRESENT
   1587         #ifdef CONFIG_LV_USE_CHART
   1588             #define LV_USE_CHART CONFIG_LV_USE_CHART
   1589         #else
   1590             #define LV_USE_CHART 0
   1591         #endif
   1592     #else
   1593         #define LV_USE_CHART      1
   1594     #endif
   1595 #endif
   1596 
   1597 #ifndef LV_USE_COLORWHEEL
   1598     #ifdef _LV_KCONFIG_PRESENT
   1599         #ifdef CONFIG_LV_USE_COLORWHEEL
   1600             #define LV_USE_COLORWHEEL CONFIG_LV_USE_COLORWHEEL
   1601         #else
   1602             #define LV_USE_COLORWHEEL 0
   1603         #endif
   1604     #else
   1605         #define LV_USE_COLORWHEEL 1
   1606     #endif
   1607 #endif
   1608 
   1609 #ifndef LV_USE_IMGBTN
   1610     #ifdef _LV_KCONFIG_PRESENT
   1611         #ifdef CONFIG_LV_USE_IMGBTN
   1612             #define LV_USE_IMGBTN CONFIG_LV_USE_IMGBTN
   1613         #else
   1614             #define LV_USE_IMGBTN 0
   1615         #endif
   1616     #else
   1617         #define LV_USE_IMGBTN     1
   1618     #endif
   1619 #endif
   1620 
   1621 #ifndef LV_USE_KEYBOARD
   1622     #ifdef _LV_KCONFIG_PRESENT
   1623         #ifdef CONFIG_LV_USE_KEYBOARD
   1624             #define LV_USE_KEYBOARD CONFIG_LV_USE_KEYBOARD
   1625         #else
   1626             #define LV_USE_KEYBOARD 0
   1627         #endif
   1628     #else
   1629         #define LV_USE_KEYBOARD   1
   1630     #endif
   1631 #endif
   1632 
   1633 #ifndef LV_USE_LED
   1634     #ifdef _LV_KCONFIG_PRESENT
   1635         #ifdef CONFIG_LV_USE_LED
   1636             #define LV_USE_LED CONFIG_LV_USE_LED
   1637         #else
   1638             #define LV_USE_LED 0
   1639         #endif
   1640     #else
   1641         #define LV_USE_LED        1
   1642     #endif
   1643 #endif
   1644 
   1645 #ifndef LV_USE_LIST
   1646     #ifdef _LV_KCONFIG_PRESENT
   1647         #ifdef CONFIG_LV_USE_LIST
   1648             #define LV_USE_LIST CONFIG_LV_USE_LIST
   1649         #else
   1650             #define LV_USE_LIST 0
   1651         #endif
   1652     #else
   1653         #define LV_USE_LIST       1
   1654     #endif
   1655 #endif
   1656 
   1657 #ifndef LV_USE_MENU
   1658     #ifdef _LV_KCONFIG_PRESENT
   1659         #ifdef CONFIG_LV_USE_MENU
   1660             #define LV_USE_MENU CONFIG_LV_USE_MENU
   1661         #else
   1662             #define LV_USE_MENU 0
   1663         #endif
   1664     #else
   1665         #define LV_USE_MENU       1
   1666     #endif
   1667 #endif
   1668 
   1669 #ifndef LV_USE_METER
   1670     #ifdef _LV_KCONFIG_PRESENT
   1671         #ifdef CONFIG_LV_USE_METER
   1672             #define LV_USE_METER CONFIG_LV_USE_METER
   1673         #else
   1674             #define LV_USE_METER 0
   1675         #endif
   1676     #else
   1677         #define LV_USE_METER      1
   1678     #endif
   1679 #endif
   1680 
   1681 #ifndef LV_USE_MSGBOX
   1682     #ifdef _LV_KCONFIG_PRESENT
   1683         #ifdef CONFIG_LV_USE_MSGBOX
   1684             #define LV_USE_MSGBOX CONFIG_LV_USE_MSGBOX
   1685         #else
   1686             #define LV_USE_MSGBOX 0
   1687         #endif
   1688     #else
   1689         #define LV_USE_MSGBOX     1
   1690     #endif
   1691 #endif
   1692 
   1693 #ifndef LV_USE_SPINBOX
   1694     #ifdef _LV_KCONFIG_PRESENT
   1695         #ifdef CONFIG_LV_USE_SPINBOX
   1696             #define LV_USE_SPINBOX CONFIG_LV_USE_SPINBOX
   1697         #else
   1698             #define LV_USE_SPINBOX 0
   1699         #endif
   1700     #else
   1701         #define LV_USE_SPINBOX    1
   1702     #endif
   1703 #endif
   1704 
   1705 #ifndef LV_USE_SPINNER
   1706     #ifdef _LV_KCONFIG_PRESENT
   1707         #ifdef CONFIG_LV_USE_SPINNER
   1708             #define LV_USE_SPINNER CONFIG_LV_USE_SPINNER
   1709         #else
   1710             #define LV_USE_SPINNER 0
   1711         #endif
   1712     #else
   1713         #define LV_USE_SPINNER    1
   1714     #endif
   1715 #endif
   1716 
   1717 #ifndef LV_USE_TABVIEW
   1718     #ifdef _LV_KCONFIG_PRESENT
   1719         #ifdef CONFIG_LV_USE_TABVIEW
   1720             #define LV_USE_TABVIEW CONFIG_LV_USE_TABVIEW
   1721         #else
   1722             #define LV_USE_TABVIEW 0
   1723         #endif
   1724     #else
   1725         #define LV_USE_TABVIEW    1
   1726     #endif
   1727 #endif
   1728 
   1729 #ifndef LV_USE_TILEVIEW
   1730     #ifdef _LV_KCONFIG_PRESENT
   1731         #ifdef CONFIG_LV_USE_TILEVIEW
   1732             #define LV_USE_TILEVIEW CONFIG_LV_USE_TILEVIEW
   1733         #else
   1734             #define LV_USE_TILEVIEW 0
   1735         #endif
   1736     #else
   1737         #define LV_USE_TILEVIEW   1
   1738     #endif
   1739 #endif
   1740 
   1741 #ifndef LV_USE_WIN
   1742     #ifdef _LV_KCONFIG_PRESENT
   1743         #ifdef CONFIG_LV_USE_WIN
   1744             #define LV_USE_WIN CONFIG_LV_USE_WIN
   1745         #else
   1746             #define LV_USE_WIN 0
   1747         #endif
   1748     #else
   1749         #define LV_USE_WIN        1
   1750     #endif
   1751 #endif
   1752 
   1753 #ifndef LV_USE_SPAN
   1754     #ifdef _LV_KCONFIG_PRESENT
   1755         #ifdef CONFIG_LV_USE_SPAN
   1756             #define LV_USE_SPAN CONFIG_LV_USE_SPAN
   1757         #else
   1758             #define LV_USE_SPAN 0
   1759         #endif
   1760     #else
   1761         #define LV_USE_SPAN       1
   1762     #endif
   1763 #endif
   1764 #if LV_USE_SPAN
   1765     /*A line text can contain maximum num of span descriptor */
   1766     #ifndef LV_SPAN_SNIPPET_STACK_SIZE
   1767         #ifdef CONFIG_LV_SPAN_SNIPPET_STACK_SIZE
   1768             #define LV_SPAN_SNIPPET_STACK_SIZE CONFIG_LV_SPAN_SNIPPET_STACK_SIZE
   1769         #else
   1770             #define LV_SPAN_SNIPPET_STACK_SIZE 64
   1771         #endif
   1772     #endif
   1773 #endif
   1774 
   1775 /*-----------
   1776  * Themes
   1777  *----------*/
   1778 
   1779 /*A simple, impressive and very complete theme*/
   1780 #ifndef LV_USE_THEME_DEFAULT
   1781     #ifdef _LV_KCONFIG_PRESENT
   1782         #ifdef CONFIG_LV_USE_THEME_DEFAULT
   1783             #define LV_USE_THEME_DEFAULT CONFIG_LV_USE_THEME_DEFAULT
   1784         #else
   1785             #define LV_USE_THEME_DEFAULT 0
   1786         #endif
   1787     #else
   1788         #define LV_USE_THEME_DEFAULT 1
   1789     #endif
   1790 #endif
   1791 #if LV_USE_THEME_DEFAULT
   1792 
   1793     /*0: Light mode; 1: Dark mode*/
   1794     #ifndef LV_THEME_DEFAULT_DARK
   1795         #ifdef CONFIG_LV_THEME_DEFAULT_DARK
   1796             #define LV_THEME_DEFAULT_DARK CONFIG_LV_THEME_DEFAULT_DARK
   1797         #else
   1798             #define LV_THEME_DEFAULT_DARK 0
   1799         #endif
   1800     #endif
   1801 
   1802     /*1: Enable grow on press*/
   1803     #ifndef LV_THEME_DEFAULT_GROW
   1804         #ifdef _LV_KCONFIG_PRESENT
   1805             #ifdef CONFIG_LV_THEME_DEFAULT_GROW
   1806                 #define LV_THEME_DEFAULT_GROW CONFIG_LV_THEME_DEFAULT_GROW
   1807             #else
   1808                 #define LV_THEME_DEFAULT_GROW 0
   1809             #endif
   1810         #else
   1811             #define LV_THEME_DEFAULT_GROW 1
   1812         #endif
   1813     #endif
   1814 
   1815     /*Default transition time in [ms]*/
   1816     #ifndef LV_THEME_DEFAULT_TRANSITION_TIME
   1817         #ifdef CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME
   1818             #define LV_THEME_DEFAULT_TRANSITION_TIME CONFIG_LV_THEME_DEFAULT_TRANSITION_TIME
   1819         #else
   1820             #define LV_THEME_DEFAULT_TRANSITION_TIME 80
   1821         #endif
   1822     #endif
   1823 #endif /*LV_USE_THEME_DEFAULT*/
   1824 
   1825 /*A very simple theme that is a good starting point for a custom theme*/
   1826 #ifndef LV_USE_THEME_BASIC
   1827     #ifdef _LV_KCONFIG_PRESENT
   1828         #ifdef CONFIG_LV_USE_THEME_BASIC
   1829             #define LV_USE_THEME_BASIC CONFIG_LV_USE_THEME_BASIC
   1830         #else
   1831             #define LV_USE_THEME_BASIC 0
   1832         #endif
   1833     #else
   1834         #define LV_USE_THEME_BASIC 1
   1835     #endif
   1836 #endif
   1837 
   1838 /*A theme designed for monochrome displays*/
   1839 #ifndef LV_USE_THEME_MONO
   1840     #ifdef _LV_KCONFIG_PRESENT
   1841         #ifdef CONFIG_LV_USE_THEME_MONO
   1842             #define LV_USE_THEME_MONO CONFIG_LV_USE_THEME_MONO
   1843         #else
   1844             #define LV_USE_THEME_MONO 0
   1845         #endif
   1846     #else
   1847         #define LV_USE_THEME_MONO 1
   1848     #endif
   1849 #endif
   1850 
   1851 /*-----------
   1852  * Layouts
   1853  *----------*/
   1854 
   1855 /*A layout similar to Flexbox in CSS.*/
   1856 #ifndef LV_USE_FLEX
   1857     #ifdef _LV_KCONFIG_PRESENT
   1858         #ifdef CONFIG_LV_USE_FLEX
   1859             #define LV_USE_FLEX CONFIG_LV_USE_FLEX
   1860         #else
   1861             #define LV_USE_FLEX 0
   1862         #endif
   1863     #else
   1864         #define LV_USE_FLEX 1
   1865     #endif
   1866 #endif
   1867 
   1868 /*A layout similar to Grid in CSS.*/
   1869 #ifndef LV_USE_GRID
   1870     #ifdef _LV_KCONFIG_PRESENT
   1871         #ifdef CONFIG_LV_USE_GRID
   1872             #define LV_USE_GRID CONFIG_LV_USE_GRID
   1873         #else
   1874             #define LV_USE_GRID 0
   1875         #endif
   1876     #else
   1877         #define LV_USE_GRID 1
   1878     #endif
   1879 #endif
   1880 
   1881 /*---------------------
   1882  * 3rd party libraries
   1883  *--------------------*/
   1884 
   1885 /*File system interfaces for common APIs */
   1886 
   1887 /*API for fopen, fread, etc*/
   1888 #ifndef LV_USE_FS_STDIO
   1889     #ifdef CONFIG_LV_USE_FS_STDIO
   1890         #define LV_USE_FS_STDIO CONFIG_LV_USE_FS_STDIO
   1891     #else
   1892         #define LV_USE_FS_STDIO 0
   1893     #endif
   1894 #endif
   1895 #if LV_USE_FS_STDIO
   1896     #ifndef LV_FS_STDIO_LETTER
   1897         #ifdef CONFIG_LV_FS_STDIO_LETTER
   1898             #define LV_FS_STDIO_LETTER CONFIG_LV_FS_STDIO_LETTER
   1899         #else
   1900             #define LV_FS_STDIO_LETTER '\0'     /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
   1901         #endif
   1902     #endif
   1903     #ifndef LV_FS_STDIO_PATH
   1904         #ifdef CONFIG_LV_FS_STDIO_PATH
   1905             #define LV_FS_STDIO_PATH CONFIG_LV_FS_STDIO_PATH
   1906         #else
   1907             #define LV_FS_STDIO_PATH ""         /*Set the working directory. File/directory paths will be appended to it.*/
   1908         #endif
   1909     #endif
   1910     #ifndef LV_FS_STDIO_CACHE_SIZE
   1911         #ifdef CONFIG_LV_FS_STDIO_CACHE_SIZE
   1912             #define LV_FS_STDIO_CACHE_SIZE CONFIG_LV_FS_STDIO_CACHE_SIZE
   1913         #else
   1914             #define LV_FS_STDIO_CACHE_SIZE  0   /*>0 to cache this number of bytes in lv_fs_read()*/
   1915         #endif
   1916     #endif
   1917 #endif
   1918 
   1919 /*API for open, read, etc*/
   1920 #ifndef LV_USE_FS_POSIX
   1921     #ifdef CONFIG_LV_USE_FS_POSIX
   1922         #define LV_USE_FS_POSIX CONFIG_LV_USE_FS_POSIX
   1923     #else
   1924         #define LV_USE_FS_POSIX 0
   1925     #endif
   1926 #endif
   1927 #if LV_USE_FS_POSIX
   1928     #ifndef LV_FS_POSIX_LETTER
   1929         #ifdef CONFIG_LV_FS_POSIX_LETTER
   1930             #define LV_FS_POSIX_LETTER CONFIG_LV_FS_POSIX_LETTER
   1931         #else
   1932             #define LV_FS_POSIX_LETTER '\0'     /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
   1933         #endif
   1934     #endif
   1935     #ifndef LV_FS_POSIX_PATH
   1936         #ifdef CONFIG_LV_FS_POSIX_PATH
   1937             #define LV_FS_POSIX_PATH CONFIG_LV_FS_POSIX_PATH
   1938         #else
   1939             #define LV_FS_POSIX_PATH ""         /*Set the working directory. File/directory paths will be appended to it.*/
   1940         #endif
   1941     #endif
   1942     #ifndef LV_FS_POSIX_CACHE_SIZE
   1943         #ifdef CONFIG_LV_FS_POSIX_CACHE_SIZE
   1944             #define LV_FS_POSIX_CACHE_SIZE CONFIG_LV_FS_POSIX_CACHE_SIZE
   1945         #else
   1946             #define LV_FS_POSIX_CACHE_SIZE  0   /*>0 to cache this number of bytes in lv_fs_read()*/
   1947         #endif
   1948     #endif
   1949 #endif
   1950 
   1951 /*API for CreateFile, ReadFile, etc*/
   1952 #ifndef LV_USE_FS_WIN32
   1953     #ifdef CONFIG_LV_USE_FS_WIN32
   1954         #define LV_USE_FS_WIN32 CONFIG_LV_USE_FS_WIN32
   1955     #else
   1956         #define LV_USE_FS_WIN32 0
   1957     #endif
   1958 #endif
   1959 #if LV_USE_FS_WIN32
   1960     #ifndef LV_FS_WIN32_LETTER
   1961         #ifdef CONFIG_LV_FS_WIN32_LETTER
   1962             #define LV_FS_WIN32_LETTER CONFIG_LV_FS_WIN32_LETTER
   1963         #else
   1964             #define LV_FS_WIN32_LETTER  '\0'    /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
   1965         #endif
   1966     #endif
   1967     #ifndef LV_FS_WIN32_PATH
   1968         #ifdef CONFIG_LV_FS_WIN32_PATH
   1969             #define LV_FS_WIN32_PATH CONFIG_LV_FS_WIN32_PATH
   1970         #else
   1971             #define LV_FS_WIN32_PATH ""         /*Set the working directory. File/directory paths will be appended to it.*/
   1972         #endif
   1973     #endif
   1974     #ifndef LV_FS_WIN32_CACHE_SIZE
   1975         #ifdef CONFIG_LV_FS_WIN32_CACHE_SIZE
   1976             #define LV_FS_WIN32_CACHE_SIZE CONFIG_LV_FS_WIN32_CACHE_SIZE
   1977         #else
   1978             #define LV_FS_WIN32_CACHE_SIZE 0    /*>0 to cache this number of bytes in lv_fs_read()*/
   1979         #endif
   1980     #endif
   1981 #endif
   1982 
   1983 /*API for FATFS (needs to be added separately). Uses f_open, f_read, etc*/
   1984 #ifndef LV_USE_FS_FATFS
   1985     #ifdef CONFIG_LV_USE_FS_FATFS
   1986         #define LV_USE_FS_FATFS CONFIG_LV_USE_FS_FATFS
   1987     #else
   1988         #define LV_USE_FS_FATFS  0
   1989     #endif
   1990 #endif
   1991 #if LV_USE_FS_FATFS
   1992     #ifndef LV_FS_FATFS_LETTER
   1993         #ifdef CONFIG_LV_FS_FATFS_LETTER
   1994             #define LV_FS_FATFS_LETTER CONFIG_LV_FS_FATFS_LETTER
   1995         #else
   1996             #define LV_FS_FATFS_LETTER '\0'     /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
   1997         #endif
   1998     #endif
   1999     #ifndef LV_FS_FATFS_CACHE_SIZE
   2000         #ifdef CONFIG_LV_FS_FATFS_CACHE_SIZE
   2001             #define LV_FS_FATFS_CACHE_SIZE CONFIG_LV_FS_FATFS_CACHE_SIZE
   2002         #else
   2003             #define LV_FS_FATFS_CACHE_SIZE 0    /*>0 to cache this number of bytes in lv_fs_read()*/
   2004         #endif
   2005     #endif
   2006 #endif
   2007 
   2008 /*PNG decoder library*/
   2009 #ifndef LV_USE_PNG
   2010     #ifdef CONFIG_LV_USE_PNG
   2011         #define LV_USE_PNG CONFIG_LV_USE_PNG
   2012     #else
   2013         #define LV_USE_PNG 0
   2014     #endif
   2015 #endif
   2016 
   2017 /*BMP decoder library*/
   2018 #ifndef LV_USE_BMP
   2019     #ifdef CONFIG_LV_USE_BMP
   2020         #define LV_USE_BMP CONFIG_LV_USE_BMP
   2021     #else
   2022         #define LV_USE_BMP 0
   2023     #endif
   2024 #endif
   2025 
   2026 /* JPG + split JPG decoder library.
   2027  * Split JPG is a custom format optimized for embedded systems. */
   2028 #ifndef LV_USE_SJPG
   2029     #ifdef CONFIG_LV_USE_SJPG
   2030         #define LV_USE_SJPG CONFIG_LV_USE_SJPG
   2031     #else
   2032         #define LV_USE_SJPG 0
   2033     #endif
   2034 #endif
   2035 
   2036 /*GIF decoder library*/
   2037 #ifndef LV_USE_GIF
   2038     #ifdef CONFIG_LV_USE_GIF
   2039         #define LV_USE_GIF CONFIG_LV_USE_GIF
   2040     #else
   2041         #define LV_USE_GIF 0
   2042     #endif
   2043 #endif
   2044 
   2045 /*QR code library*/
   2046 #ifndef LV_USE_QRCODE
   2047     #ifdef CONFIG_LV_USE_QRCODE
   2048         #define LV_USE_QRCODE CONFIG_LV_USE_QRCODE
   2049     #else
   2050         #define LV_USE_QRCODE 0
   2051     #endif
   2052 #endif
   2053 
   2054 /*FreeType library*/
   2055 #ifndef LV_USE_FREETYPE
   2056     #ifdef CONFIG_LV_USE_FREETYPE
   2057         #define LV_USE_FREETYPE CONFIG_LV_USE_FREETYPE
   2058     #else
   2059         #define LV_USE_FREETYPE 0
   2060     #endif
   2061 #endif
   2062 #if LV_USE_FREETYPE
   2063     /*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/
   2064     #ifndef LV_FREETYPE_CACHE_SIZE
   2065         #ifdef CONFIG_LV_FREETYPE_CACHE_SIZE
   2066             #define LV_FREETYPE_CACHE_SIZE CONFIG_LV_FREETYPE_CACHE_SIZE
   2067         #else
   2068             #define LV_FREETYPE_CACHE_SIZE (16 * 1024)
   2069         #endif
   2070     #endif
   2071     #if LV_FREETYPE_CACHE_SIZE >= 0
   2072         /* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */
   2073         /* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */
   2074         /* if font size >= 256, must be configured as image cache */
   2075         #ifndef LV_FREETYPE_SBIT_CACHE
   2076             #ifdef CONFIG_LV_FREETYPE_SBIT_CACHE
   2077                 #define LV_FREETYPE_SBIT_CACHE CONFIG_LV_FREETYPE_SBIT_CACHE
   2078             #else
   2079                 #define LV_FREETYPE_SBIT_CACHE 0
   2080             #endif
   2081         #endif
   2082         /* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */
   2083         /* (0:use system defaults) */
   2084         #ifndef LV_FREETYPE_CACHE_FT_FACES
   2085             #ifdef CONFIG_LV_FREETYPE_CACHE_FT_FACES
   2086                 #define LV_FREETYPE_CACHE_FT_FACES CONFIG_LV_FREETYPE_CACHE_FT_FACES
   2087             #else
   2088                 #define LV_FREETYPE_CACHE_FT_FACES 0
   2089             #endif
   2090         #endif
   2091         #ifndef LV_FREETYPE_CACHE_FT_SIZES
   2092             #ifdef CONFIG_LV_FREETYPE_CACHE_FT_SIZES
   2093                 #define LV_FREETYPE_CACHE_FT_SIZES CONFIG_LV_FREETYPE_CACHE_FT_SIZES
   2094             #else
   2095                 #define LV_FREETYPE_CACHE_FT_SIZES 0
   2096             #endif
   2097         #endif
   2098     #endif
   2099 #endif
   2100 
   2101 /*Rlottie library*/
   2102 #ifndef LV_USE_RLOTTIE
   2103     #ifdef CONFIG_LV_USE_RLOTTIE
   2104         #define LV_USE_RLOTTIE CONFIG_LV_USE_RLOTTIE
   2105     #else
   2106         #define LV_USE_RLOTTIE 0
   2107     #endif
   2108 #endif
   2109 
   2110 /*FFmpeg library for image decoding and playing videos
   2111  *Supports all major image formats so do not enable other image decoder with it*/
   2112 #ifndef LV_USE_FFMPEG
   2113     #ifdef CONFIG_LV_USE_FFMPEG
   2114         #define LV_USE_FFMPEG CONFIG_LV_USE_FFMPEG
   2115     #else
   2116         #define LV_USE_FFMPEG  0
   2117     #endif
   2118 #endif
   2119 #if LV_USE_FFMPEG
   2120     /*Dump input information to stderr*/
   2121     #ifndef LV_FFMPEG_DUMP_FORMAT
   2122         #ifdef CONFIG_LV_FFMPEG_DUMP_FORMAT
   2123             #define LV_FFMPEG_DUMP_FORMAT CONFIG_LV_FFMPEG_DUMP_FORMAT
   2124         #else
   2125             #define LV_FFMPEG_DUMP_FORMAT 0
   2126         #endif
   2127     #endif
   2128 #endif
   2129 
   2130 /*-----------
   2131  * Others
   2132  *----------*/
   2133 
   2134 /*1: Enable API to take snapshot for object*/
   2135 #ifndef LV_USE_SNAPSHOT
   2136     #ifdef CONFIG_LV_USE_SNAPSHOT
   2137         #define LV_USE_SNAPSHOT CONFIG_LV_USE_SNAPSHOT
   2138     #else
   2139         #define LV_USE_SNAPSHOT 0
   2140     #endif
   2141 #endif
   2142 
   2143 /*1: Enable Monkey test*/
   2144 #ifndef LV_USE_MONKEY
   2145     #ifdef CONFIG_LV_USE_MONKEY
   2146         #define LV_USE_MONKEY CONFIG_LV_USE_MONKEY
   2147     #else
   2148         #define LV_USE_MONKEY   0
   2149     #endif
   2150 #endif
   2151 
   2152 /*1: Enable grid navigation*/
   2153 #ifndef LV_USE_GRIDNAV
   2154     #ifdef CONFIG_LV_USE_GRIDNAV
   2155         #define LV_USE_GRIDNAV CONFIG_LV_USE_GRIDNAV
   2156     #else
   2157         #define LV_USE_GRIDNAV  0
   2158     #endif
   2159 #endif
   2160 
   2161 /*1: Enable lv_obj fragment*/
   2162 #ifndef LV_USE_FRAGMENT
   2163     #ifdef CONFIG_LV_USE_FRAGMENT
   2164         #define LV_USE_FRAGMENT CONFIG_LV_USE_FRAGMENT
   2165     #else
   2166         #define LV_USE_FRAGMENT 0
   2167     #endif
   2168 #endif
   2169 
   2170 /*1: Support using images as font in label or span widgets */
   2171 #ifndef LV_USE_IMGFONT
   2172     #ifdef CONFIG_LV_USE_IMGFONT
   2173         #define LV_USE_IMGFONT CONFIG_LV_USE_IMGFONT
   2174     #else
   2175         #define LV_USE_IMGFONT 0
   2176     #endif
   2177 #endif
   2178 
   2179 /*1: Enable a published subscriber based messaging system */
   2180 #ifndef LV_USE_MSG
   2181     #ifdef CONFIG_LV_USE_MSG
   2182         #define LV_USE_MSG CONFIG_LV_USE_MSG
   2183     #else
   2184         #define LV_USE_MSG 0
   2185     #endif
   2186 #endif
   2187 
   2188 /*==================
   2189 * EXAMPLES
   2190 *==================*/
   2191 
   2192 /*Enable the examples to be built with the library*/
   2193 #ifndef LV_BUILD_EXAMPLES
   2194     #ifdef _LV_KCONFIG_PRESENT
   2195         #ifdef CONFIG_LV_BUILD_EXAMPLES
   2196             #define LV_BUILD_EXAMPLES CONFIG_LV_BUILD_EXAMPLES
   2197         #else
   2198             #define LV_BUILD_EXAMPLES 0
   2199         #endif
   2200     #else
   2201         #define LV_BUILD_EXAMPLES 1
   2202     #endif
   2203 #endif
   2204 
   2205 /*===================
   2206  * DEMO USAGE
   2207  ====================*/
   2208 
   2209 /*Show some widget. It might be required to increase `LV_MEM_SIZE` */
   2210 #ifndef LV_USE_DEMO_WIDGETS
   2211     #ifdef CONFIG_LV_USE_DEMO_WIDGETS
   2212         #define LV_USE_DEMO_WIDGETS CONFIG_LV_USE_DEMO_WIDGETS
   2213     #else
   2214         #define LV_USE_DEMO_WIDGETS        0
   2215     #endif
   2216 #endif
   2217 #if LV_USE_DEMO_WIDGETS
   2218 #ifndef LV_DEMO_WIDGETS_SLIDESHOW
   2219     #ifdef CONFIG_LV_DEMO_WIDGETS_SLIDESHOW
   2220         #define LV_DEMO_WIDGETS_SLIDESHOW CONFIG_LV_DEMO_WIDGETS_SLIDESHOW
   2221     #else
   2222         #define LV_DEMO_WIDGETS_SLIDESHOW  0
   2223     #endif
   2224 #endif
   2225 #endif
   2226 
   2227 /*Demonstrate the usage of encoder and keyboard*/
   2228 #ifndef LV_USE_DEMO_KEYPAD_AND_ENCODER
   2229     #ifdef CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER
   2230         #define LV_USE_DEMO_KEYPAD_AND_ENCODER CONFIG_LV_USE_DEMO_KEYPAD_AND_ENCODER
   2231     #else
   2232         #define LV_USE_DEMO_KEYPAD_AND_ENCODER     0
   2233     #endif
   2234 #endif
   2235 
   2236 /*Benchmark your system*/
   2237 #ifndef LV_USE_DEMO_BENCHMARK
   2238     #ifdef CONFIG_LV_USE_DEMO_BENCHMARK
   2239         #define LV_USE_DEMO_BENCHMARK CONFIG_LV_USE_DEMO_BENCHMARK
   2240     #else
   2241         #define LV_USE_DEMO_BENCHMARK   0
   2242     #endif
   2243 #endif
   2244 
   2245 /*Stress test for LVGL*/
   2246 #ifndef LV_USE_DEMO_STRESS
   2247     #ifdef CONFIG_LV_USE_DEMO_STRESS
   2248         #define LV_USE_DEMO_STRESS CONFIG_LV_USE_DEMO_STRESS
   2249     #else
   2250         #define LV_USE_DEMO_STRESS      0
   2251     #endif
   2252 #endif
   2253 
   2254 /*Music player demo*/
   2255 #ifndef LV_USE_DEMO_MUSIC
   2256     #ifdef CONFIG_LV_USE_DEMO_MUSIC
   2257         #define LV_USE_DEMO_MUSIC CONFIG_LV_USE_DEMO_MUSIC
   2258     #else
   2259         #define LV_USE_DEMO_MUSIC       0
   2260     #endif
   2261 #endif
   2262 #if LV_USE_DEMO_MUSIC
   2263 #ifndef LV_DEMO_MUSIC_SQUARE
   2264     #ifdef CONFIG_LV_DEMO_MUSIC_SQUARE
   2265         #define LV_DEMO_MUSIC_SQUARE CONFIG_LV_DEMO_MUSIC_SQUARE
   2266     #else
   2267         #define LV_DEMO_MUSIC_SQUARE       0
   2268     #endif
   2269 #endif
   2270 #ifndef LV_DEMO_MUSIC_LANDSCAPE
   2271     #ifdef CONFIG_LV_DEMO_MUSIC_LANDSCAPE
   2272         #define LV_DEMO_MUSIC_LANDSCAPE CONFIG_LV_DEMO_MUSIC_LANDSCAPE
   2273     #else
   2274         #define LV_DEMO_MUSIC_LANDSCAPE    0
   2275     #endif
   2276 #endif
   2277 #ifndef LV_DEMO_MUSIC_ROUND
   2278     #ifdef CONFIG_LV_DEMO_MUSIC_ROUND
   2279         #define LV_DEMO_MUSIC_ROUND CONFIG_LV_DEMO_MUSIC_ROUND
   2280     #else
   2281         #define LV_DEMO_MUSIC_ROUND        0
   2282     #endif
   2283 #endif
   2284 #ifndef LV_DEMO_MUSIC_LARGE
   2285     #ifdef CONFIG_LV_DEMO_MUSIC_LARGE
   2286         #define LV_DEMO_MUSIC_LARGE CONFIG_LV_DEMO_MUSIC_LARGE
   2287     #else
   2288         #define LV_DEMO_MUSIC_LARGE        0
   2289     #endif
   2290 #endif
   2291 #ifndef LV_DEMO_MUSIC_AUTO_PLAY
   2292     #ifdef CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
   2293         #define LV_DEMO_MUSIC_AUTO_PLAY CONFIG_LV_DEMO_MUSIC_AUTO_PLAY
   2294     #else
   2295         #define LV_DEMO_MUSIC_AUTO_PLAY    0
   2296     #endif
   2297 #endif
   2298 #endif
   2299 
   2300 
   2301 
   2302 /*----------------------------------
   2303  * End of parsing lv_conf_template.h
   2304  -----------------------------------*/
   2305 
   2306 LV_EXPORT_CONST_INT(LV_DPI_DEF);
   2307 
   2308 #undef _LV_KCONFIG_PRESENT
   2309 
   2310 
   2311 /*Set some defines if a dependency is disabled*/
   2312 #if LV_USE_LOG == 0
   2313     #define LV_LOG_LEVEL            LV_LOG_LEVEL_NONE
   2314     #define LV_LOG_TRACE_MEM        0
   2315     #define LV_LOG_TRACE_TIMER      0
   2316     #define LV_LOG_TRACE_INDEV      0
   2317     #define LV_LOG_TRACE_DISP_REFR  0
   2318     #define LV_LOG_TRACE_EVENT      0
   2319     #define LV_LOG_TRACE_OBJ_CREATE 0
   2320     #define LV_LOG_TRACE_LAYOUT     0
   2321     #define LV_LOG_TRACE_ANIM       0
   2322 #endif  /*LV_USE_LOG*/
   2323 
   2324 
   2325 /*If running without lv_conf.h add typedefs with default value*/
   2326 #ifdef LV_CONF_SKIP
   2327     #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)    /*Disable warnings for Visual Studio*/
   2328         #define _CRT_SECURE_NO_WARNINGS
   2329     #endif
   2330 #endif  /*defined(LV_CONF_SKIP)*/
   2331 
   2332 #endif  /*LV_CONF_INTERNAL_H*/