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