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