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 /*If lv_conf.h is not skipped include it*/ 14 #if !defined(LV_CONF_SKIP) && !defined(CONFIG_LV_CONF_SKIP) 15 # if defined(LV_CONF_PATH) /*If there is a path defined for lv_conf.h use it*/ 16 # define __LV_TO_STR_AUX(x) #x 17 # define __LV_TO_STR(x) __LV_TO_STR_AUX(x) 18 # include __LV_TO_STR(LV_CONF_PATH) 19 # undef __LV_TO_STR_AUX 20 # undef __LV_TO_STR 21 # elif defined(LV_CONF_INCLUDE_SIMPLE) /*Or simply include lv_conf.h is enabled*/ 22 # include "lv_conf.h" 23 # else 24 # include "../../lv_conf.h" /*Else assume lv_conf.h is next to the lvgl folder */ 25 # endif 26 #endif 27 28 /* clang-format off */ 29 30 #include <stdint.h> 31 32 /*==================== 33 Graphical settings 34 *====================*/ 35 36 /* Maximal horizontal and vertical resolution to support by the library.*/ 37 #ifndef LV_HOR_RES_MAX 38 # ifdef CONFIG_LV_HOR_RES_MAX 39 # define LV_HOR_RES_MAX CONFIG_LV_HOR_RES_MAX 40 # else 41 # define LV_HOR_RES_MAX (480) 42 # endif 43 #endif 44 #ifndef LV_VER_RES_MAX 45 # ifdef CONFIG_LV_VER_RES_MAX 46 # define LV_VER_RES_MAX CONFIG_LV_VER_RES_MAX 47 # else 48 # define LV_VER_RES_MAX (320) 49 # endif 50 #endif 51 52 /* Color depth: 53 * - 1: 1 byte per pixel 54 * - 8: RGB332 55 * - 16: RGB565 56 * - 32: ARGB8888 57 */ 58 #ifndef LV_COLOR_DEPTH 59 # ifdef CONFIG_LV_COLOR_DEPTH 60 # define LV_COLOR_DEPTH CONFIG_LV_COLOR_DEPTH 61 # else 62 # define LV_COLOR_DEPTH 16 63 # endif 64 #endif 65 66 /* Swap the 2 bytes of RGB565 color. 67 * Useful if the display has a 8 bit interface (e.g. SPI)*/ 68 #ifndef LV_COLOR_16_SWAP 69 # ifdef CONFIG_LV_COLOR_16_SWAP 70 # define LV_COLOR_16_SWAP CONFIG_LV_COLOR_16_SWAP 71 # else 72 # define LV_COLOR_16_SWAP 0 73 # endif 74 #endif 75 76 /* 1: Enable screen transparency. 77 * Useful for OSD or other overlapping GUIs. 78 * Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/ 79 #ifndef LV_COLOR_SCREEN_TRANSP 80 # ifdef CONFIG_LV_COLOR_SCREEN_TRANSP 81 # define LV_COLOR_SCREEN_TRANSP CONFIG_LV_COLOR_SCREEN_TRANSP 82 # else 83 # define LV_COLOR_SCREEN_TRANSP 0 84 # endif 85 #endif 86 87 /*Images pixels with this color will not be drawn (with chroma keying)*/ 88 #ifndef LV_COLOR_TRANSP 89 # ifdef CONFIG_LV_COLOR_TRANSP 90 # define LV_COLOR_TRANSP CONFIG_LV_COLOR_TRANSP 91 # else 92 # define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/ 93 # endif 94 #endif 95 96 /* Enable anti-aliasing (lines, and radiuses will be smoothed) */ 97 #ifndef LV_ANTIALIAS 98 # ifdef CONFIG_LV_ANTIALIAS 99 # define LV_ANTIALIAS CONFIG_LV_ANTIALIAS 100 # else 101 # define LV_ANTIALIAS 1 102 # endif 103 #endif 104 105 /* Default display refresh period. 106 * Can be changed in the display driver (`lv_disp_drv_t`).*/ 107 #ifndef LV_DISP_DEF_REFR_PERIOD 108 # ifdef CONFIG_LV_DISP_DEF_REFR_PERIOD 109 # define LV_DISP_DEF_REFR_PERIOD CONFIG_LV_DISP_DEF_REFR_PERIOD 110 # else 111 # define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/ 112 # endif 113 #endif 114 115 /* Dot Per Inch: used to initialize default sizes. 116 * E.g. a button with width = LV_DPI / 2 -> half inch wide 117 * (Not so important, you can adjust it to modify default sizes and spaces)*/ 118 #ifndef LV_DPI 119 # ifdef CONFIG_LV_DPI 120 # define LV_DPI CONFIG_LV_DPI 121 # else 122 # define LV_DPI 130 /*[px]*/ 123 # endif 124 #endif 125 126 /* The the real width of the display changes some default values: 127 * default object sizes, layout of examples, etc. 128 * According to the width of the display (hor. res. / dpi) 129 * the displays fall in 4 categories. 130 * The 4th is extra large which has no upper limit so not listed here 131 * The upper limit of the categories are set below in 0.1 inch unit. 132 */ 133 #ifndef LV_DISP_SMALL_LIMIT 134 # ifdef CONFIG_LV_DISP_SMALL_LIMIT 135 # define LV_DISP_SMALL_LIMIT CONFIG_LV_DISP_SMALL_LIMIT 136 # else 137 # define LV_DISP_SMALL_LIMIT 30 138 # endif 139 #endif 140 #ifndef LV_DISP_MEDIUM_LIMIT 141 # ifdef CONFIG_LV_DISP_MEDIUM_LIMIT 142 # define LV_DISP_MEDIUM_LIMIT CONFIG_LV_DISP_MEDIUM_LIMIT 143 # else 144 # define LV_DISP_MEDIUM_LIMIT 50 145 # endif 146 #endif 147 #ifndef LV_DISP_LARGE_LIMIT 148 # ifdef CONFIG_LV_DISP_LARGE_LIMIT 149 # define LV_DISP_LARGE_LIMIT CONFIG_LV_DISP_LARGE_LIMIT 150 # else 151 # define LV_DISP_LARGE_LIMIT 70 152 # endif 153 #endif 154 155 /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ 156 157 /*========================= 158 Memory manager settings 159 *=========================*/ 160 161 /* LittelvGL's internal memory manager's settings. 162 * The graphical objects and other related data are stored here. */ 163 164 /* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */ 165 #ifndef LV_MEM_CUSTOM 166 # ifdef CONFIG_LV_MEM_CUSTOM 167 # define LV_MEM_CUSTOM CONFIG_LV_MEM_CUSTOM 168 # else 169 # define LV_MEM_CUSTOM 0 170 # endif 171 #endif 172 #if LV_MEM_CUSTOM == 0 173 /* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ 174 #ifndef LV_MEM_SIZE 175 # ifdef CONFIG_LV_MEM_SIZE 176 # define LV_MEM_SIZE CONFIG_LV_MEM_SIZE 177 # else 178 # define LV_MEM_SIZE (32U * 1024U) 179 # endif 180 #endif 181 182 /* Complier prefix for a big array declaration */ 183 #ifndef LV_MEM_ATTR 184 # ifdef CONFIG_LV_MEM_ATTR 185 # define LV_MEM_ATTR CONFIG_LV_MEM_ATTR 186 # else 187 # define LV_MEM_ATTR 188 # endif 189 #endif 190 191 /* Set an address for the memory pool instead of allocating it as an array. 192 * Can be in external SRAM too. */ 193 #ifndef LV_MEM_ADR 194 # ifdef CONFIG_LV_MEM_ADR 195 # define LV_MEM_ADR CONFIG_LV_MEM_ADR 196 # else 197 # define LV_MEM_ADR 0 198 # endif 199 #endif 200 201 /* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */ 202 #ifndef LV_MEM_AUTO_DEFRAG 203 # ifdef CONFIG_LV_MEM_AUTO_DEFRAG 204 # define LV_MEM_AUTO_DEFRAG CONFIG_LV_MEM_AUTO_DEFRAG 205 # else 206 # define LV_MEM_AUTO_DEFRAG 1 207 # endif 208 #endif 209 #else /*LV_MEM_CUSTOM*/ 210 #ifndef LV_MEM_CUSTOM_INCLUDE 211 # ifdef CONFIG_LV_MEM_CUSTOM_INCLUDE 212 # define LV_MEM_CUSTOM_INCLUDE CONFIG_LV_MEM_CUSTOM_INCLUDE 213 # else 214 # define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/ 215 # endif 216 #endif 217 #ifndef LV_MEM_CUSTOM_ALLOC 218 # ifdef CONFIG_LV_MEM_CUSTOM_ALLOC 219 # define LV_MEM_CUSTOM_ALLOC CONFIG_LV_MEM_CUSTOM_ALLOC 220 # else 221 # define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/ 222 # endif 223 #endif 224 #ifndef LV_MEM_CUSTOM_FREE 225 # ifdef CONFIG_LV_MEM_CUSTOM_FREE 226 # define LV_MEM_CUSTOM_FREE CONFIG_LV_MEM_CUSTOM_FREE 227 # else 228 # define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/ 229 # endif 230 #endif 231 #endif /*LV_MEM_CUSTOM*/ 232 233 /* Use the standard memcpy and memset instead of LVGL's own functions. 234 * The standard functions might or might not be faster depending on their implementation. */ 235 #ifndef LV_MEMCPY_MEMSET_STD 236 # ifdef CONFIG_LV_MEMCPY_MEMSET_STD 237 # define LV_MEMCPY_MEMSET_STD CONFIG_LV_MEMCPY_MEMSET_STD 238 # else 239 # define LV_MEMCPY_MEMSET_STD 0 240 # endif 241 #endif 242 243 /* Garbage Collector settings 244 * Used if lvgl is binded to higher level language and the memory is managed by that language */ 245 #ifndef LV_ENABLE_GC 246 # ifdef CONFIG_LV_ENABLE_GC 247 # define LV_ENABLE_GC CONFIG_LV_ENABLE_GC 248 # else 249 # define LV_ENABLE_GC 0 250 # endif 251 #endif 252 #if LV_ENABLE_GC != 0 253 #ifndef LV_GC_INCLUDE 254 # ifdef CONFIG_LV_GC_INCLUDE 255 # define LV_GC_INCLUDE CONFIG_LV_GC_INCLUDE 256 # else 257 # define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/ 258 # endif 259 #endif 260 #ifndef LV_MEM_CUSTOM_REALLOC 261 # ifdef CONFIG_LV_MEM_CUSTOM_REALLOC 262 # define LV_MEM_CUSTOM_REALLOC CONFIG_LV_MEM_CUSTOM_REALLOC 263 # else 264 # define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/ 265 # endif 266 #endif 267 #ifndef LV_MEM_CUSTOM_GET_SIZE 268 # ifdef CONFIG_LV_MEM_CUSTOM_GET_SIZE 269 # define LV_MEM_CUSTOM_GET_SIZE CONFIG_LV_MEM_CUSTOM_GET_SIZE 270 # else 271 # define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/ 272 # endif 273 #endif 274 #endif /* LV_ENABLE_GC */ 275 276 /*======================= 277 Input device settings 278 *=======================*/ 279 280 /* Input device default settings. 281 * Can be changed in the Input device driver (`lv_indev_drv_t`)*/ 282 283 /* Input device read period in milliseconds */ 284 #ifndef LV_INDEV_DEF_READ_PERIOD 285 # ifdef CONFIG_LV_INDEV_DEF_READ_PERIOD 286 # define LV_INDEV_DEF_READ_PERIOD CONFIG_LV_INDEV_DEF_READ_PERIOD 287 # else 288 # define LV_INDEV_DEF_READ_PERIOD 30 289 # endif 290 #endif 291 292 /* Drag threshold in pixels */ 293 #ifndef LV_INDEV_DEF_DRAG_LIMIT 294 # ifdef CONFIG_LV_INDEV_DEF_DRAG_LIMIT 295 # define LV_INDEV_DEF_DRAG_LIMIT CONFIG_LV_INDEV_DEF_DRAG_LIMIT 296 # else 297 # define LV_INDEV_DEF_DRAG_LIMIT 10 298 # endif 299 #endif 300 301 /* Drag throw slow-down in [%]. Greater value -> faster slow-down */ 302 #ifndef LV_INDEV_DEF_DRAG_THROW 303 # ifdef CONFIG_LV_INDEV_DEF_DRAG_THROW 304 # define LV_INDEV_DEF_DRAG_THROW CONFIG_LV_INDEV_DEF_DRAG_THROW 305 # else 306 # define LV_INDEV_DEF_DRAG_THROW 10 307 # endif 308 #endif 309 310 /* Long press time in milliseconds. 311 * Time to send `LV_EVENT_LONG_PRESSSED`) */ 312 #ifndef LV_INDEV_DEF_LONG_PRESS_TIME 313 # ifdef CONFIG_LV_INDEV_DEF_LONG_PRESS_TIME 314 # define LV_INDEV_DEF_LONG_PRESS_TIME CONFIG_LV_INDEV_DEF_LONG_PRESS_TIME 315 # else 316 # define LV_INDEV_DEF_LONG_PRESS_TIME 400 317 # endif 318 #endif 319 320 /* Repeated trigger period in long press [ms] 321 * Time between `LV_EVENT_LONG_PRESSED_REPEAT */ 322 #ifndef LV_INDEV_DEF_LONG_PRESS_REP_TIME 323 # ifdef CONFIG_LV_INDEV_DEF_LONG_PRESS_REP_TIME 324 # define LV_INDEV_DEF_LONG_PRESS_REP_TIME CONFIG_LV_INDEV_DEF_LONG_PRESS_REP_TIME 325 # else 326 # define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100 327 # endif 328 #endif 329 330 331 /* Gesture threshold in pixels */ 332 #ifndef LV_INDEV_DEF_GESTURE_LIMIT 333 # ifdef CONFIG_LV_INDEV_DEF_GESTURE_LIMIT 334 # define LV_INDEV_DEF_GESTURE_LIMIT CONFIG_LV_INDEV_DEF_GESTURE_LIMIT 335 # else 336 # define LV_INDEV_DEF_GESTURE_LIMIT 50 337 # endif 338 #endif 339 340 /* Gesture min velocity at release before swipe (pixels)*/ 341 #ifndef LV_INDEV_DEF_GESTURE_MIN_VELOCITY 342 # ifdef CONFIG_LV_INDEV_DEF_GESTURE_MIN_VELOCITY 343 # define LV_INDEV_DEF_GESTURE_MIN_VELOCITY CONFIG_LV_INDEV_DEF_GESTURE_MIN_VELOCITY 344 # else 345 # define LV_INDEV_DEF_GESTURE_MIN_VELOCITY 3 346 # endif 347 #endif 348 349 /*================== 350 * Feature usage 351 *==================*/ 352 353 /*1: Enable the Animations */ 354 #ifndef LV_USE_ANIMATION 355 # ifdef CONFIG_LV_USE_ANIMATION 356 # define LV_USE_ANIMATION CONFIG_LV_USE_ANIMATION 357 # else 358 # define LV_USE_ANIMATION 1 359 # endif 360 #endif 361 #if LV_USE_ANIMATION 362 363 /*Declare the type of the user data of animations (can be e.g. `void *`, `int`, `struct`)*/ 364 365 #endif 366 367 /* 1: Enable shadow drawing on rectangles*/ 368 #ifndef LV_USE_SHADOW 369 # ifdef CONFIG_LV_USE_SHADOW 370 # define LV_USE_SHADOW CONFIG_LV_USE_SHADOW 371 # else 372 # define LV_USE_SHADOW 1 373 # endif 374 #endif 375 #if LV_USE_SHADOW 376 /* Allow buffering some shadow calculation 377 * LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, 378 * where shadow size is `shadow_width + radius` 379 * Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/ 380 #ifndef LV_SHADOW_CACHE_SIZE 381 # ifdef CONFIG_LV_SHADOW_CACHE_SIZE 382 # define LV_SHADOW_CACHE_SIZE CONFIG_LV_SHADOW_CACHE_SIZE 383 # else 384 # define LV_SHADOW_CACHE_SIZE 0 385 # endif 386 #endif 387 #endif 388 389 /*1: enable outline drawing on rectangles*/ 390 #ifndef LV_USE_OUTLINE 391 # ifdef CONFIG_LV_USE_OUTLINE 392 # define LV_USE_OUTLINE CONFIG_LV_USE_OUTLINE 393 # else 394 # define LV_USE_OUTLINE 1 395 # endif 396 #endif 397 398 /*1: enable pattern drawing on rectangles*/ 399 #ifndef LV_USE_PATTERN 400 # ifdef CONFIG_LV_USE_PATTERN 401 # define LV_USE_PATTERN CONFIG_LV_USE_PATTERN 402 # else 403 # define LV_USE_PATTERN 1 404 # endif 405 #endif 406 407 /*1: enable value string drawing on rectangles*/ 408 #ifndef LV_USE_VALUE_STR 409 # ifdef CONFIG_LV_USE_VALUE_STR 410 # define LV_USE_VALUE_STR CONFIG_LV_USE_VALUE_STR 411 # else 412 # define LV_USE_VALUE_STR 1 413 # endif 414 #endif 415 416 /* 1: Use other blend modes than normal (`LV_BLEND_MODE_...`)*/ 417 #ifndef LV_USE_BLEND_MODES 418 # ifdef CONFIG_LV_USE_BLEND_MODES 419 # define LV_USE_BLEND_MODES CONFIG_LV_USE_BLEND_MODES 420 # else 421 # define LV_USE_BLEND_MODES 1 422 # endif 423 #endif 424 425 /* 1: Use the `opa_scale` style property to set the opacity of an object and its children at once*/ 426 #ifndef LV_USE_OPA_SCALE 427 # ifdef CONFIG_LV_USE_OPA_SCALE 428 # define LV_USE_OPA_SCALE CONFIG_LV_USE_OPA_SCALE 429 # else 430 # define LV_USE_OPA_SCALE 1 431 # endif 432 #endif 433 434 /* 1: Use image zoom and rotation*/ 435 #ifndef LV_USE_IMG_TRANSFORM 436 # ifdef CONFIG_LV_USE_IMG_TRANSFORM 437 # define LV_USE_IMG_TRANSFORM CONFIG_LV_USE_IMG_TRANSFORM 438 # else 439 # define LV_USE_IMG_TRANSFORM 1 440 # endif 441 #endif 442 443 /* 1: Enable object groups (for keyboard/encoder navigation) */ 444 #ifndef LV_USE_GROUP 445 # ifdef CONFIG_LV_USE_GROUP 446 # define LV_USE_GROUP CONFIG_LV_USE_GROUP 447 # else 448 # define LV_USE_GROUP 1 449 # endif 450 #endif 451 #if LV_USE_GROUP 452 #endif /*LV_USE_GROUP*/ 453 454 /* 1: Enable GPU interface*/ 455 #ifndef LV_USE_GPU 456 # ifdef CONFIG_LV_USE_GPU 457 # define LV_USE_GPU CONFIG_LV_USE_GPU 458 # else 459 # define LV_USE_GPU 1 /*Only enables `gpu_fill_cb` and `gpu_blend_cb` in the disp. drv- */ 460 # endif 461 #endif 462 #ifndef LV_USE_GPU_STM32_DMA2D 463 # ifdef CONFIG_LV_USE_GPU_STM32_DMA2D 464 # define LV_USE_GPU_STM32_DMA2D CONFIG_LV_USE_GPU_STM32_DMA2D 465 # else 466 # define LV_USE_GPU_STM32_DMA2D 0 467 # endif 468 #endif 469 /*If enabling LV_USE_GPU_STM32_DMA2D, LV_GPU_DMA2D_CMSIS_INCLUDE must be defined to include path of CMSIS header of target processor 470 e.g. "stm32f769xx.h" or "stm32f429xx.h" */ 471 #ifndef LV_GPU_DMA2D_CMSIS_INCLUDE 472 # ifdef CONFIG_LV_GPU_DMA2D_CMSIS_INCLUDE 473 # define LV_GPU_DMA2D_CMSIS_INCLUDE CONFIG_LV_GPU_DMA2D_CMSIS_INCLUDE 474 # else 475 # define LV_GPU_DMA2D_CMSIS_INCLUDE 476 # endif 477 #endif 478 479 /* 1: Enable file system (might be required for images */ 480 #ifndef LV_USE_FILESYSTEM 481 # ifdef CONFIG_LV_USE_FILESYSTEM 482 # define LV_USE_FILESYSTEM CONFIG_LV_USE_FILESYSTEM 483 # else 484 # define LV_USE_FILESYSTEM 1 485 # endif 486 #endif 487 #if LV_USE_FILESYSTEM 488 /*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/ 489 #endif 490 491 /*1: Add a `user_data` to drivers and objects*/ 492 #ifndef LV_USE_USER_DATA 493 # ifdef CONFIG_LV_USE_USER_DATA 494 # define LV_USE_USER_DATA CONFIG_LV_USE_USER_DATA 495 # else 496 # define LV_USE_USER_DATA 0 497 # endif 498 #endif 499 500 /*1: Show CPU usage and FPS count in the right bottom corner*/ 501 #ifndef LV_USE_PERF_MONITOR 502 # ifdef CONFIG_LV_USE_PERF_MONITOR 503 # define LV_USE_PERF_MONITOR CONFIG_LV_USE_PERF_MONITOR 504 # else 505 # define LV_USE_PERF_MONITOR 0 506 # endif 507 #endif 508 509 /*1: Use the functions and types from the older API if possible */ 510 #ifndef LV_USE_API_EXTENSION_V6 511 # ifdef CONFIG_LV_USE_API_EXTENSION_V6 512 # define LV_USE_API_EXTENSION_V6 CONFIG_LV_USE_API_EXTENSION_V6 513 # else 514 # define LV_USE_API_EXTENSION_V6 1 515 # endif 516 #endif 517 #ifndef LV_USE_API_EXTENSION_V7 518 # ifdef CONFIG_LV_USE_API_EXTENSION_V7 519 # define LV_USE_API_EXTENSION_V7 CONFIG_LV_USE_API_EXTENSION_V7 520 # else 521 # define LV_USE_API_EXTENSION_V7 1 522 # endif 523 #endif 524 525 /*======================== 526 * Image decoder and cache 527 *========================*/ 528 529 /* 1: Enable indexed (palette) images */ 530 #ifndef LV_IMG_CF_INDEXED 531 # ifdef CONFIG_LV_IMG_CF_INDEXED 532 # define LV_IMG_CF_INDEXED CONFIG_LV_IMG_CF_INDEXED 533 # else 534 # define LV_IMG_CF_INDEXED 1 535 # endif 536 #endif 537 538 /* 1: Enable alpha indexed images */ 539 #ifndef LV_IMG_CF_ALPHA 540 # ifdef CONFIG_LV_IMG_CF_ALPHA 541 # define LV_IMG_CF_ALPHA CONFIG_LV_IMG_CF_ALPHA 542 # else 543 # define LV_IMG_CF_ALPHA 1 544 # endif 545 #endif 546 547 /* Default image cache size. Image caching keeps the images opened. 548 * If only the built-in image formats are used there is no real advantage of caching. 549 * (I.e. no new image decoder is added) 550 * With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images. 551 * However the opened images might consume additional RAM. 552 * LV_IMG_CACHE_DEF_SIZE must be >= 1 */ 553 #ifndef LV_IMG_CACHE_DEF_SIZE 554 # ifdef CONFIG_LV_IMG_CACHE_DEF_SIZE 555 # define LV_IMG_CACHE_DEF_SIZE CONFIG_LV_IMG_CACHE_DEF_SIZE 556 # else 557 # define LV_IMG_CACHE_DEF_SIZE 1 558 # endif 559 #endif 560 561 /*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/ 562 563 /*===================== 564 * Compiler settings 565 *====================*/ 566 567 /* For big endian systems set to 1 */ 568 #ifndef LV_BIG_ENDIAN_SYSTEM 569 # ifdef CONFIG_LV_BIG_ENDIAN_SYSTEM 570 # define LV_BIG_ENDIAN_SYSTEM CONFIG_LV_BIG_ENDIAN_SYSTEM 571 # else 572 # define LV_BIG_ENDIAN_SYSTEM 0 573 # endif 574 #endif 575 576 /* Define a custom attribute to `lv_tick_inc` function */ 577 #ifndef LV_ATTRIBUTE_TICK_INC 578 # ifdef CONFIG_LV_ATTRIBUTE_TICK_INC 579 # define LV_ATTRIBUTE_TICK_INC CONFIG_LV_ATTRIBUTE_TICK_INC 580 # else 581 # define LV_ATTRIBUTE_TICK_INC 582 # endif 583 #endif 584 585 /* Define a custom attribute to `lv_task_handler` function */ 586 #ifndef LV_ATTRIBUTE_TASK_HANDLER 587 # ifdef CONFIG_LV_ATTRIBUTE_TASK_HANDLER 588 # define LV_ATTRIBUTE_TASK_HANDLER CONFIG_LV_ATTRIBUTE_TASK_HANDLER 589 # else 590 # define LV_ATTRIBUTE_TASK_HANDLER 591 # endif 592 #endif 593 594 /* Define a custom attribute to `lv_disp_flush_ready` function */ 595 #ifndef LV_ATTRIBUTE_FLUSH_READY 596 # ifdef CONFIG_LV_ATTRIBUTE_FLUSH_READY 597 # define LV_ATTRIBUTE_FLUSH_READY CONFIG_LV_ATTRIBUTE_FLUSH_READY 598 # else 599 # define LV_ATTRIBUTE_FLUSH_READY 600 # endif 601 #endif 602 603 /* With size optimization (-Os) the compiler might not align data to 604 * 4 or 8 byte boundary. This alignment will be explicitly applied where needed. 605 * E.g. __attribute__((aligned(4))) */ 606 #ifndef LV_ATTRIBUTE_MEM_ALIGN 607 # ifdef CONFIG_LV_ATTRIBUTE_MEM_ALIGN 608 # define LV_ATTRIBUTE_MEM_ALIGN CONFIG_LV_ATTRIBUTE_MEM_ALIGN 609 # else 610 # define LV_ATTRIBUTE_MEM_ALIGN 611 # endif 612 #endif 613 614 /* Attribute to mark large constant arrays for example 615 * font's bitmaps */ 616 #ifndef LV_ATTRIBUTE_LARGE_CONST 617 # ifdef CONFIG_LV_ATTRIBUTE_LARGE_CONST 618 # define LV_ATTRIBUTE_LARGE_CONST CONFIG_LV_ATTRIBUTE_LARGE_CONST 619 # else 620 # define LV_ATTRIBUTE_LARGE_CONST 621 # endif 622 #endif 623 624 /* Prefix performance critical functions to place them into a faster memory (e.g RAM) 625 * Uses 15-20 kB extra memory */ 626 #ifndef LV_ATTRIBUTE_FAST_MEM 627 # ifdef CONFIG_LV_ATTRIBUTE_FAST_MEM 628 # define LV_ATTRIBUTE_FAST_MEM CONFIG_LV_ATTRIBUTE_FAST_MEM 629 # else 630 # define LV_ATTRIBUTE_FAST_MEM 631 # endif 632 #endif 633 634 /* Export integer constant to binding. 635 * This macro is used with constants in the form of LV_<CONST> that 636 * should also appear on lvgl binding API such as Micropython 637 * 638 * The default value just prevents a GCC warning. 639 */ 640 #ifndef LV_EXPORT_CONST_INT 641 # ifdef CONFIG_LV_EXPORT_CONST_INT 642 # define LV_EXPORT_CONST_INT CONFIG_LV_EXPORT_CONST_INT 643 # else 644 # define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning 645 # endif 646 #endif 647 648 /* Prefix variables that are used in GPU accelerated operations, often these need to be 649 * placed in RAM sections that are DMA accessible */ 650 #ifndef LV_ATTRIBUTE_DMA 651 # ifdef CONFIG_LV_ATTRIBUTE_DMA 652 # define LV_ATTRIBUTE_DMA CONFIG_LV_ATTRIBUTE_DMA 653 # else 654 # define LV_ATTRIBUTE_DMA 655 # endif 656 #endif 657 658 /*=================== 659 * HAL settings 660 *==================*/ 661 662 /* 1: use a custom tick source. 663 * It removes the need to manually update the tick with `lv_tick_inc`) */ 664 #ifndef LV_TICK_CUSTOM 665 # ifdef CONFIG_LV_TICK_CUSTOM 666 # define LV_TICK_CUSTOM CONFIG_LV_TICK_CUSTOM 667 # else 668 # define LV_TICK_CUSTOM 0 669 # endif 670 #endif 671 #if LV_TICK_CUSTOM == 1 672 #ifndef LV_TICK_CUSTOM_INCLUDE 673 # ifdef CONFIG_LV_TICK_CUSTOM_INCLUDE 674 # define LV_TICK_CUSTOM_INCLUDE CONFIG_LV_TICK_CUSTOM_INCLUDE 675 # else 676 # define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/ 677 # endif 678 #endif 679 #ifndef LV_TICK_CUSTOM_SYS_TIME_EXPR 680 # ifdef CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR 681 # define LV_TICK_CUSTOM_SYS_TIME_EXPR CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR 682 # else 683 # define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/ 684 # endif 685 #endif 686 #endif /*LV_TICK_CUSTOM*/ 687 688 689 /*================ 690 * Log settings 691 *===============*/ 692 693 /*1: Enable the log module*/ 694 #ifndef LV_USE_LOG 695 # ifdef CONFIG_LV_USE_LOG 696 # define LV_USE_LOG CONFIG_LV_USE_LOG 697 # else 698 # define LV_USE_LOG 0 699 # endif 700 #endif 701 #if LV_USE_LOG 702 /* How important log should be added: 703 * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information 704 * LV_LOG_LEVEL_INFO Log important events 705 * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem 706 * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail 707 * LV_LOG_LEVEL_NONE Do not log anything 708 */ 709 #ifndef LV_LOG_LEVEL 710 # ifdef CONFIG_LV_LOG_LEVEL 711 # define LV_LOG_LEVEL CONFIG_LV_LOG_LEVEL 712 # else 713 # define LV_LOG_LEVEL LV_LOG_LEVEL_WARN 714 # endif 715 #endif 716 717 /* 1: Print the log with 'printf'; 718 * 0: user need to register a callback with `lv_log_register_print_cb`*/ 719 #ifndef LV_LOG_PRINTF 720 # ifdef CONFIG_LV_LOG_PRINTF 721 # define LV_LOG_PRINTF CONFIG_LV_LOG_PRINTF 722 # else 723 # define LV_LOG_PRINTF 0 724 # endif 725 #endif 726 #endif /*LV_USE_LOG*/ 727 728 /*================= 729 * Debug settings 730 *================*/ 731 732 /* If Debug is enabled LittelvGL validates the parameters of the functions. 733 * If an invalid parameter is found an error log message is printed and 734 * the MCU halts at the error. (`LV_USE_LOG` should be enabled) 735 * If you are debugging the MCU you can pause 736 * the debugger to see exactly where the issue is. 737 * 738 * The behavior of asserts can be overwritten by redefining them here. 739 * E.g. #define LV_ASSERT_MEM(p) <my_assert_code> 740 */ 741 #ifndef LV_USE_DEBUG 742 # ifdef CONFIG_LV_USE_DEBUG 743 # define LV_USE_DEBUG CONFIG_LV_USE_DEBUG 744 # else 745 # define LV_USE_DEBUG 1 746 # endif 747 #endif 748 #if LV_USE_DEBUG 749 750 /*Check if the parameter is NULL. (Quite fast) */ 751 #ifndef LV_USE_ASSERT_NULL 752 # ifdef CONFIG_LV_USE_ASSERT_NULL 753 # define LV_USE_ASSERT_NULL CONFIG_LV_USE_ASSERT_NULL 754 # else 755 # define LV_USE_ASSERT_NULL 1 756 # endif 757 #endif 758 759 /*Checks is the memory is successfully allocated or no. (Quite fast)*/ 760 #ifndef LV_USE_ASSERT_MEM 761 # ifdef CONFIG_LV_USE_ASSERT_MEM 762 # define LV_USE_ASSERT_MEM CONFIG_LV_USE_ASSERT_MEM 763 # else 764 # define LV_USE_ASSERT_MEM 1 765 # endif 766 #endif 767 768 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/ 769 #ifndef LV_USE_ASSERT_MEM_INTEGRITY 770 # ifdef CONFIG_LV_USE_ASSERT_MEM_INTEGRITY 771 # define LV_USE_ASSERT_MEM_INTEGRITY CONFIG_LV_USE_ASSERT_MEM_INTEGRITY 772 # else 773 # define LV_USE_ASSERT_MEM_INTEGRITY 0 774 # endif 775 #endif 776 777 /* Check the strings. 778 * Search for NULL, very long strings, invalid characters, and unnatural repetitions. (Slow) 779 * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */ 780 #ifndef LV_USE_ASSERT_STR 781 # ifdef CONFIG_LV_USE_ASSERT_STR 782 # define LV_USE_ASSERT_STR CONFIG_LV_USE_ASSERT_STR 783 # else 784 # define LV_USE_ASSERT_STR 0 785 # endif 786 #endif 787 788 /* Check NULL, the object's type and existence (e.g. not deleted). (Quite slow) 789 * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */ 790 #ifndef LV_USE_ASSERT_OBJ 791 # ifdef CONFIG_LV_USE_ASSERT_OBJ 792 # define LV_USE_ASSERT_OBJ CONFIG_LV_USE_ASSERT_OBJ 793 # else 794 # define LV_USE_ASSERT_OBJ 0 795 # endif 796 #endif 797 798 /*Check if the styles are properly initialized. (Fast)*/ 799 #ifndef LV_USE_ASSERT_STYLE 800 # ifdef CONFIG_LV_USE_ASSERT_STYLE 801 # define LV_USE_ASSERT_STYLE CONFIG_LV_USE_ASSERT_STYLE 802 # else 803 # define LV_USE_ASSERT_STYLE 0 804 # endif 805 #endif 806 807 #endif /*LV_USE_DEBUG*/ 808 809 /*================== 810 * FONT USAGE 811 *===================*/ 812 813 /* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel. 814 * The symbols are available via `LV_SYMBOL_...` defines 815 * More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html 816 * To create a new font go to: https://lvgl.com/ttf-font-to-c-array 817 */ 818 819 /* Montserrat fonts with bpp = 4 820 * https://fonts.google.com/specimen/Montserrat */ 821 #ifndef LV_FONT_MONTSERRAT_8 822 # ifdef CONFIG_LV_FONT_MONTSERRAT_8 823 # define LV_FONT_MONTSERRAT_8 CONFIG_LV_FONT_MONTSERRAT_8 824 # else 825 # define LV_FONT_MONTSERRAT_8 0 826 # endif 827 #endif 828 #ifndef LV_FONT_MONTSERRAT_10 829 # ifdef CONFIG_LV_FONT_MONTSERRAT_10 830 # define LV_FONT_MONTSERRAT_10 CONFIG_LV_FONT_MONTSERRAT_10 831 # else 832 # define LV_FONT_MONTSERRAT_10 0 833 # endif 834 #endif 835 #ifndef LV_FONT_MONTSERRAT_12 836 # ifdef CONFIG_LV_FONT_MONTSERRAT_12 837 # define LV_FONT_MONTSERRAT_12 CONFIG_LV_FONT_MONTSERRAT_12 838 # else 839 # define LV_FONT_MONTSERRAT_12 0 840 # endif 841 #endif 842 #ifndef LV_FONT_MONTSERRAT_14 843 # ifdef CONFIG_LV_FONT_MONTSERRAT_14 844 # define LV_FONT_MONTSERRAT_14 CONFIG_LV_FONT_MONTSERRAT_14 845 # else 846 # define LV_FONT_MONTSERRAT_14 1 847 # endif 848 #endif 849 #ifndef LV_FONT_MONTSERRAT_16 850 # ifdef CONFIG_LV_FONT_MONTSERRAT_16 851 # define LV_FONT_MONTSERRAT_16 CONFIG_LV_FONT_MONTSERRAT_16 852 # else 853 # define LV_FONT_MONTSERRAT_16 0 854 # endif 855 #endif 856 #ifndef LV_FONT_MONTSERRAT_18 857 # ifdef CONFIG_LV_FONT_MONTSERRAT_18 858 # define LV_FONT_MONTSERRAT_18 CONFIG_LV_FONT_MONTSERRAT_18 859 # else 860 # define LV_FONT_MONTSERRAT_18 0 861 # endif 862 #endif 863 #ifndef LV_FONT_MONTSERRAT_20 864 # ifdef CONFIG_LV_FONT_MONTSERRAT_20 865 # define LV_FONT_MONTSERRAT_20 CONFIG_LV_FONT_MONTSERRAT_20 866 # else 867 # define LV_FONT_MONTSERRAT_20 0 868 # endif 869 #endif 870 #ifndef LV_FONT_MONTSERRAT_22 871 # ifdef CONFIG_LV_FONT_MONTSERRAT_22 872 # define LV_FONT_MONTSERRAT_22 CONFIG_LV_FONT_MONTSERRAT_22 873 # else 874 # define LV_FONT_MONTSERRAT_22 0 875 # endif 876 #endif 877 #ifndef LV_FONT_MONTSERRAT_24 878 # ifdef CONFIG_LV_FONT_MONTSERRAT_24 879 # define LV_FONT_MONTSERRAT_24 CONFIG_LV_FONT_MONTSERRAT_24 880 # else 881 # define LV_FONT_MONTSERRAT_24 0 882 # endif 883 #endif 884 #ifndef LV_FONT_MONTSERRAT_26 885 # ifdef CONFIG_LV_FONT_MONTSERRAT_26 886 # define LV_FONT_MONTSERRAT_26 CONFIG_LV_FONT_MONTSERRAT_26 887 # else 888 # define LV_FONT_MONTSERRAT_26 0 889 # endif 890 #endif 891 #ifndef LV_FONT_MONTSERRAT_28 892 # ifdef CONFIG_LV_FONT_MONTSERRAT_28 893 # define LV_FONT_MONTSERRAT_28 CONFIG_LV_FONT_MONTSERRAT_28 894 # else 895 # define LV_FONT_MONTSERRAT_28 0 896 # endif 897 #endif 898 #ifndef LV_FONT_MONTSERRAT_30 899 # ifdef CONFIG_LV_FONT_MONTSERRAT_30 900 # define LV_FONT_MONTSERRAT_30 CONFIG_LV_FONT_MONTSERRAT_30 901 # else 902 # define LV_FONT_MONTSERRAT_30 0 903 # endif 904 #endif 905 #ifndef LV_FONT_MONTSERRAT_32 906 # ifdef CONFIG_LV_FONT_MONTSERRAT_32 907 # define LV_FONT_MONTSERRAT_32 CONFIG_LV_FONT_MONTSERRAT_32 908 # else 909 # define LV_FONT_MONTSERRAT_32 0 910 # endif 911 #endif 912 #ifndef LV_FONT_MONTSERRAT_34 913 # ifdef CONFIG_LV_FONT_MONTSERRAT_34 914 # define LV_FONT_MONTSERRAT_34 CONFIG_LV_FONT_MONTSERRAT_34 915 # else 916 # define LV_FONT_MONTSERRAT_34 0 917 # endif 918 #endif 919 #ifndef LV_FONT_MONTSERRAT_36 920 # ifdef CONFIG_LV_FONT_MONTSERRAT_36 921 # define LV_FONT_MONTSERRAT_36 CONFIG_LV_FONT_MONTSERRAT_36 922 # else 923 # define LV_FONT_MONTSERRAT_36 0 924 # endif 925 #endif 926 #ifndef LV_FONT_MONTSERRAT_38 927 # ifdef CONFIG_LV_FONT_MONTSERRAT_38 928 # define LV_FONT_MONTSERRAT_38 CONFIG_LV_FONT_MONTSERRAT_38 929 # else 930 # define LV_FONT_MONTSERRAT_38 0 931 # endif 932 #endif 933 #ifndef LV_FONT_MONTSERRAT_40 934 # ifdef CONFIG_LV_FONT_MONTSERRAT_40 935 # define LV_FONT_MONTSERRAT_40 CONFIG_LV_FONT_MONTSERRAT_40 936 # else 937 # define LV_FONT_MONTSERRAT_40 0 938 # endif 939 #endif 940 #ifndef LV_FONT_MONTSERRAT_42 941 # ifdef CONFIG_LV_FONT_MONTSERRAT_42 942 # define LV_FONT_MONTSERRAT_42 CONFIG_LV_FONT_MONTSERRAT_42 943 # else 944 # define LV_FONT_MONTSERRAT_42 0 945 # endif 946 #endif 947 #ifndef LV_FONT_MONTSERRAT_44 948 # ifdef CONFIG_LV_FONT_MONTSERRAT_44 949 # define LV_FONT_MONTSERRAT_44 CONFIG_LV_FONT_MONTSERRAT_44 950 # else 951 # define LV_FONT_MONTSERRAT_44 0 952 # endif 953 #endif 954 #ifndef LV_FONT_MONTSERRAT_46 955 # ifdef CONFIG_LV_FONT_MONTSERRAT_46 956 # define LV_FONT_MONTSERRAT_46 CONFIG_LV_FONT_MONTSERRAT_46 957 # else 958 # define LV_FONT_MONTSERRAT_46 0 959 # endif 960 #endif 961 #ifndef LV_FONT_MONTSERRAT_48 962 # ifdef CONFIG_LV_FONT_MONTSERRAT_48 963 # define LV_FONT_MONTSERRAT_48 CONFIG_LV_FONT_MONTSERRAT_48 964 # else 965 # define LV_FONT_MONTSERRAT_48 0 966 # endif 967 #endif 968 969 /* Demonstrate special features */ 970 #ifndef LV_FONT_MONTSERRAT_12_SUBPX 971 # ifdef CONFIG_LV_FONT_MONTSERRAT_12_SUBPX 972 # define LV_FONT_MONTSERRAT_12_SUBPX CONFIG_LV_FONT_MONTSERRAT_12_SUBPX 973 # else 974 # define LV_FONT_MONTSERRAT_12_SUBPX 0 975 # endif 976 #endif 977 #ifndef LV_FONT_MONTSERRAT_28_COMPRESSED 978 # ifdef CONFIG_LV_FONT_MONTSERRAT_28_COMPRESSED 979 # define LV_FONT_MONTSERRAT_28_COMPRESSED CONFIG_LV_FONT_MONTSERRAT_28_COMPRESSED 980 # else 981 # define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/ 982 # endif 983 #endif 984 #ifndef LV_FONT_DEJAVU_16_PERSIAN_HEBREW 985 # ifdef CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW 986 # define LV_FONT_DEJAVU_16_PERSIAN_HEBREW CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW 987 # else 988 # define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, PErisan letters and all their forms*/ 989 # endif 990 #endif 991 #ifndef LV_FONT_SIMSUN_16_CJK 992 # ifdef CONFIG_LV_FONT_SIMSUN_16_CJK 993 # define LV_FONT_SIMSUN_16_CJK CONFIG_LV_FONT_SIMSUN_16_CJK 994 # else 995 # define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/ 996 # endif 997 #endif 998 999 /*Pixel perfect monospace font 1000 * http://pelulamu.net/unscii/ */ 1001 #ifndef LV_FONT_UNSCII_8 1002 # ifdef CONFIG_LV_FONT_UNSCII_8 1003 # define LV_FONT_UNSCII_8 CONFIG_LV_FONT_UNSCII_8 1004 # else 1005 # define LV_FONT_UNSCII_8 0 1006 # endif 1007 #endif 1008 1009 /* Optionally declare your custom fonts here. 1010 * You can use these fonts as default font too 1011 * and they will be available globally. E.g. 1012 * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \ 1013 * LV_FONT_DECLARE(my_font_2) 1014 */ 1015 #ifndef LV_FONT_CUSTOM_DECLARE 1016 # ifdef CONFIG_LV_FONT_CUSTOM_DECLARE 1017 # define LV_FONT_CUSTOM_DECLARE CONFIG_LV_FONT_CUSTOM_DECLARE 1018 # else 1019 # define LV_FONT_CUSTOM_DECLARE 1020 # endif 1021 #endif 1022 1023 /* Enable it if you have fonts with a lot of characters. 1024 * The limit depends on the font size, font face and bpp 1025 * but with > 10,000 characters if you see issues probably you need to enable it.*/ 1026 #ifndef LV_FONT_FMT_TXT_LARGE 1027 # ifdef CONFIG_LV_FONT_FMT_TXT_LARGE 1028 # define LV_FONT_FMT_TXT_LARGE CONFIG_LV_FONT_FMT_TXT_LARGE 1029 # else 1030 # define LV_FONT_FMT_TXT_LARGE 0 1031 # endif 1032 #endif 1033 1034 /* Enables/disables support for compressed fonts. If it's disabled, compressed 1035 * glyphs cannot be processed by the library and won't be rendered. 1036 */ 1037 #ifndef LV_USE_FONT_COMPRESSED 1038 # ifdef CONFIG_LV_USE_FONT_COMPRESSED 1039 # define LV_USE_FONT_COMPRESSED CONFIG_LV_USE_FONT_COMPRESSED 1040 # else 1041 # define LV_USE_FONT_COMPRESSED 1 1042 # endif 1043 #endif 1044 1045 /* Enable subpixel rendering */ 1046 #ifndef LV_USE_FONT_SUBPX 1047 # ifdef CONFIG_LV_USE_FONT_SUBPX 1048 # define LV_USE_FONT_SUBPX CONFIG_LV_USE_FONT_SUBPX 1049 # else 1050 # define LV_USE_FONT_SUBPX 1 1051 # endif 1052 #endif 1053 #if LV_USE_FONT_SUBPX 1054 /* Set the pixel order of the display. 1055 * Important only if "subpx fonts" are used. 1056 * With "normal" font it doesn't matter. 1057 */ 1058 #ifndef LV_FONT_SUBPX_BGR 1059 # ifdef CONFIG_LV_FONT_SUBPX_BGR 1060 # define LV_FONT_SUBPX_BGR CONFIG_LV_FONT_SUBPX_BGR 1061 # else 1062 # define LV_FONT_SUBPX_BGR 0 1063 # endif 1064 #endif 1065 #endif 1066 1067 /*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/ 1068 1069 /*================ 1070 * THEME USAGE 1071 *================*/ 1072 1073 /*Always enable at least on theme*/ 1074 1075 /* No theme, you can apply your styles as you need 1076 * No flags. Set LV_THEME_DEFAULT_FLAG 0 */ 1077 #ifndef LV_USE_THEME_EMPTY 1078 # ifdef CONFIG_LV_USE_THEME_EMPTY 1079 # define LV_USE_THEME_EMPTY CONFIG_LV_USE_THEME_EMPTY 1080 # else 1081 # define LV_USE_THEME_EMPTY 1 1082 # endif 1083 #endif 1084 1085 /*Simple to the create your theme based on it 1086 * No flags. Set LV_THEME_DEFAULT_FLAG 0 */ 1087 #ifndef LV_USE_THEME_TEMPLATE 1088 # ifdef CONFIG_LV_USE_THEME_TEMPLATE 1089 # define LV_USE_THEME_TEMPLATE CONFIG_LV_USE_THEME_TEMPLATE 1090 # else 1091 # define LV_USE_THEME_TEMPLATE 1 1092 # endif 1093 #endif 1094 1095 /* A fast and impressive theme. 1096 * Flags: 1097 * LV_THEME_MATERIAL_FLAG_LIGHT: light theme 1098 * LV_THEME_MATERIAL_FLAG_DARK: dark theme 1099 * LV_THEME_MATERIAL_FLAG_NO_TRANSITION: disable transitions (state change animations) 1100 * LV_THEME_MATERIAL_FLAG_NO_FOCUS: disable indication of focused state) 1101 * */ 1102 #ifndef LV_USE_THEME_MATERIAL 1103 # ifdef CONFIG_LV_USE_THEME_MATERIAL 1104 # define LV_USE_THEME_MATERIAL CONFIG_LV_USE_THEME_MATERIAL 1105 # else 1106 # define LV_USE_THEME_MATERIAL 1 1107 # endif 1108 #endif 1109 1110 /* Mono-color theme for monochrome displays. 1111 * If LV_THEME_DEFAULT_COLOR_PRIMARY is LV_COLOR_BLACK the 1112 * texts and borders will be black and the background will be 1113 * white. Else the colors are inverted. 1114 * No flags. Set LV_THEME_DEFAULT_FLAG 0 */ 1115 #ifndef LV_USE_THEME_MONO 1116 # ifdef CONFIG_LV_USE_THEME_MONO 1117 # define LV_USE_THEME_MONO CONFIG_LV_USE_THEME_MONO 1118 # else 1119 # define LV_USE_THEME_MONO 1 1120 # endif 1121 #endif 1122 1123 #ifndef LV_THEME_DEFAULT_INCLUDE 1124 # ifdef CONFIG_LV_THEME_DEFAULT_INCLUDE 1125 # define LV_THEME_DEFAULT_INCLUDE CONFIG_LV_THEME_DEFAULT_INCLUDE 1126 # else 1127 # define LV_THEME_DEFAULT_INCLUDE <stdint.h> /*Include a header for the init. function*/ 1128 # endif 1129 #endif 1130 #ifndef LV_THEME_DEFAULT_INIT 1131 # ifdef CONFIG_LV_THEME_DEFAULT_INIT 1132 # define LV_THEME_DEFAULT_INIT CONFIG_LV_THEME_DEFAULT_INIT 1133 # else 1134 # define LV_THEME_DEFAULT_INIT lv_theme_material_init 1135 # endif 1136 #endif 1137 #ifndef LV_THEME_DEFAULT_COLOR_PRIMARY 1138 # ifdef CONFIG_LV_THEME_DEFAULT_COLOR_PRIMARY 1139 # define LV_THEME_DEFAULT_COLOR_PRIMARY CONFIG_LV_THEME_DEFAULT_COLOR_PRIMARY 1140 # else 1141 # define LV_THEME_DEFAULT_COLOR_PRIMARY lv_color_hex(0x01a2b1) 1142 # endif 1143 #endif 1144 #ifndef LV_THEME_DEFAULT_COLOR_SECONDARY 1145 # ifdef CONFIG_LV_THEME_DEFAULT_COLOR_SECONDARY 1146 # define LV_THEME_DEFAULT_COLOR_SECONDARY CONFIG_LV_THEME_DEFAULT_COLOR_SECONDARY 1147 # else 1148 # define LV_THEME_DEFAULT_COLOR_SECONDARY lv_color_hex(0x44d1b6) 1149 # endif 1150 #endif 1151 #ifndef LV_THEME_DEFAULT_FLAG 1152 # ifdef CONFIG_LV_THEME_DEFAULT_FLAG 1153 # define LV_THEME_DEFAULT_FLAG CONFIG_LV_THEME_DEFAULT_FLAG 1154 # else 1155 # define LV_THEME_DEFAULT_FLAG LV_THEME_MATERIAL_FLAG_LIGHT 1156 # endif 1157 #endif 1158 #ifndef LV_THEME_DEFAULT_FONT_SMALL 1159 # ifdef CONFIG_LV_THEME_DEFAULT_FONT_SMALL 1160 # define LV_THEME_DEFAULT_FONT_SMALL CONFIG_LV_THEME_DEFAULT_FONT_SMALL 1161 # else 1162 # define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_14 1163 # endif 1164 #endif 1165 #ifndef LV_THEME_DEFAULT_FONT_NORMAL 1166 # ifdef CONFIG_LV_THEME_DEFAULT_FONT_NORMAL 1167 # define LV_THEME_DEFAULT_FONT_NORMAL CONFIG_LV_THEME_DEFAULT_FONT_NORMAL 1168 # else 1169 # define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_14 1170 # endif 1171 #endif 1172 #ifndef LV_THEME_DEFAULT_FONT_SUBTITLE 1173 # ifdef CONFIG_LV_THEME_DEFAULT_FONT_SUBTITLE 1174 # define LV_THEME_DEFAULT_FONT_SUBTITLE CONFIG_LV_THEME_DEFAULT_FONT_SUBTITLE 1175 # else 1176 # define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_14 1177 # endif 1178 #endif 1179 #ifndef LV_THEME_DEFAULT_FONT_TITLE 1180 # ifdef CONFIG_LV_THEME_DEFAULT_FONT_TITLE 1181 # define LV_THEME_DEFAULT_FONT_TITLE CONFIG_LV_THEME_DEFAULT_FONT_TITLE 1182 # else 1183 # define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_14 1184 # endif 1185 #endif 1186 1187 /*================= 1188 * Text settings 1189 *=================*/ 1190 1191 /* Select a character encoding for strings. 1192 * Your IDE or editor should have the same character encoding 1193 * - LV_TXT_ENC_UTF8 1194 * - LV_TXT_ENC_ASCII 1195 * */ 1196 #ifndef LV_TXT_ENC 1197 # ifdef CONFIG_LV_TXT_ENC 1198 # define LV_TXT_ENC CONFIG_LV_TXT_ENC 1199 # else 1200 # define LV_TXT_ENC LV_TXT_ENC_UTF8 1201 # endif 1202 #endif 1203 1204 /*Can break (wrap) texts on these chars*/ 1205 #ifndef LV_TXT_BREAK_CHARS 1206 # ifdef CONFIG_LV_TXT_BREAK_CHARS 1207 # define LV_TXT_BREAK_CHARS CONFIG_LV_TXT_BREAK_CHARS 1208 # else 1209 # define LV_TXT_BREAK_CHARS " ,.;:-_" 1210 # endif 1211 #endif 1212 1213 /* If a word is at least this long, will break wherever "prettiest" 1214 * To disable, set to a value <= 0 */ 1215 #ifndef LV_TXT_LINE_BREAK_LONG_LEN 1216 # ifdef CONFIG_LV_TXT_LINE_BREAK_LONG_LEN 1217 # define LV_TXT_LINE_BREAK_LONG_LEN CONFIG_LV_TXT_LINE_BREAK_LONG_LEN 1218 # else 1219 # define LV_TXT_LINE_BREAK_LONG_LEN 0 1220 # endif 1221 #endif 1222 1223 /* Minimum number of characters in a long word to put on a line before a break. 1224 * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */ 1225 #ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 1226 # ifdef CONFIG_LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 1227 # define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN CONFIG_LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 1228 # else 1229 # define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 1230 # endif 1231 #endif 1232 1233 /* Minimum number of characters in a long word to put on a line after a break. 1234 * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */ 1235 #ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1236 # ifdef CONFIG_LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1237 # define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN CONFIG_LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1238 # else 1239 # define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3 1240 # endif 1241 #endif 1242 1243 /* The control character to use for signalling text recoloring. */ 1244 #ifndef LV_TXT_COLOR_CMD 1245 # ifdef CONFIG_LV_TXT_COLOR_CMD 1246 # define LV_TXT_COLOR_CMD CONFIG_LV_TXT_COLOR_CMD 1247 # else 1248 # define LV_TXT_COLOR_CMD "#" 1249 # endif 1250 #endif 1251 1252 /* Support bidirectional texts. 1253 * Allows mixing Left-to-Right and Right-to-Left texts. 1254 * The direction will be processed according to the Unicode Bidirectioanl Algorithm: 1255 * https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/ 1256 #ifndef LV_USE_BIDI 1257 # ifdef CONFIG_LV_USE_BIDI 1258 # define LV_USE_BIDI CONFIG_LV_USE_BIDI 1259 # else 1260 # define LV_USE_BIDI 0 1261 # endif 1262 #endif 1263 #if LV_USE_BIDI 1264 /* Set the default direction. Supported values: 1265 * `LV_BIDI_DIR_LTR` Left-to-Right 1266 * `LV_BIDI_DIR_RTL` Right-to-Left 1267 * `LV_BIDI_DIR_AUTO` detect texts base direction */ 1268 #ifndef LV_BIDI_BASE_DIR_DEF 1269 # ifdef CONFIG_LV_BIDI_BASE_DIR_DEF 1270 # define LV_BIDI_BASE_DIR_DEF CONFIG_LV_BIDI_BASE_DIR_DEF 1271 # else 1272 # define LV_BIDI_BASE_DIR_DEF LV_BIDI_DIR_AUTO 1273 # endif 1274 #endif 1275 #endif 1276 1277 /* Enable Arabic/Persian processing 1278 * In these languages characters should be replaced with 1279 * an other form based on their position in the text */ 1280 #ifndef LV_USE_ARABIC_PERSIAN_CHARS 1281 # ifdef CONFIG_LV_USE_ARABIC_PERSIAN_CHARS 1282 # define LV_USE_ARABIC_PERSIAN_CHARS CONFIG_LV_USE_ARABIC_PERSIAN_CHARS 1283 # else 1284 # define LV_USE_ARABIC_PERSIAN_CHARS 0 1285 # endif 1286 #endif 1287 1288 /*Change the built in (v)snprintf functions*/ 1289 #ifndef LV_SPRINTF_CUSTOM 1290 # ifdef CONFIG_LV_SPRINTF_CUSTOM 1291 # define LV_SPRINTF_CUSTOM CONFIG_LV_SPRINTF_CUSTOM 1292 # else 1293 # define LV_SPRINTF_CUSTOM 0 1294 # endif 1295 #endif 1296 #if LV_SPRINTF_CUSTOM 1297 #ifndef LV_SPRINTF_INCLUDE 1298 # ifdef CONFIG_LV_SPRINTF_INCLUDE 1299 # define LV_SPRINTF_INCLUDE CONFIG_LV_SPRINTF_INCLUDE 1300 # else 1301 # define LV_SPRINTF_INCLUDE <stdio.h> 1302 # endif 1303 #endif 1304 #ifndef lv_snprintf 1305 # ifdef CONFIG_lv_snprintf 1306 # define lv_snprintf CONFIG_lv_snprintf 1307 # else 1308 # define lv_snprintf snprintf 1309 # endif 1310 #endif 1311 #ifndef lv_vsnprintf 1312 # ifdef CONFIG_lv_vsnprintf 1313 # define lv_vsnprintf CONFIG_lv_vsnprintf 1314 # else 1315 # define lv_vsnprintf vsnprintf 1316 # endif 1317 #endif 1318 #else /*!LV_SPRINTF_CUSTOM*/ 1319 #ifndef LV_SPRINTF_DISABLE_FLOAT 1320 # ifdef CONFIG_LV_SPRINTF_DISABLE_FLOAT 1321 # define LV_SPRINTF_DISABLE_FLOAT CONFIG_LV_SPRINTF_DISABLE_FLOAT 1322 # else 1323 # define LV_SPRINTF_DISABLE_FLOAT 1 1324 # endif 1325 #endif 1326 #endif /*LV_SPRINTF_CUSTOM*/ 1327 1328 /*=================== 1329 * LV_OBJ SETTINGS 1330 *==================*/ 1331 1332 #if LV_USE_USER_DATA 1333 /*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/ 1334 /*Provide a function to free user data*/ 1335 #ifndef LV_USE_USER_DATA_FREE 1336 # ifdef CONFIG_LV_USE_USER_DATA_FREE 1337 # define LV_USE_USER_DATA_FREE CONFIG_LV_USE_USER_DATA_FREE 1338 # else 1339 # define LV_USE_USER_DATA_FREE 0 1340 # endif 1341 #endif 1342 #if LV_USE_USER_DATA_FREE 1343 #ifndef LV_USER_DATA_FREE_INCLUDE 1344 # ifdef CONFIG_LV_USER_DATA_FREE_INCLUDE 1345 # define LV_USER_DATA_FREE_INCLUDE CONFIG_LV_USER_DATA_FREE_INCLUDE 1346 # else 1347 # define LV_USER_DATA_FREE_INCLUDE "something.h" /*Header for user data free function*/ 1348 # endif 1349 #endif 1350 /* Function prototype : void user_data_free(lv_obj_t * obj); */ 1351 #ifndef LV_USER_DATA_FREE 1352 # ifdef CONFIG_LV_USER_DATA_FREE 1353 # define LV_USER_DATA_FREE CONFIG_LV_USER_DATA_FREE 1354 # else 1355 # define LV_USER_DATA_FREE (user_data_free) /*Invoking for user data free function*/ 1356 # endif 1357 #endif 1358 #endif 1359 #endif 1360 1361 /*1: enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/ 1362 #ifndef LV_USE_OBJ_REALIGN 1363 # ifdef CONFIG_LV_USE_OBJ_REALIGN 1364 # define LV_USE_OBJ_REALIGN CONFIG_LV_USE_OBJ_REALIGN 1365 # else 1366 # define LV_USE_OBJ_REALIGN 1 1367 # endif 1368 #endif 1369 1370 /* Enable to make the object clickable on a larger area. 1371 * LV_EXT_CLICK_AREA_OFF or 0: Disable this feature 1372 * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px) 1373 * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px) 1374 */ 1375 #ifndef LV_USE_EXT_CLICK_AREA 1376 # ifdef CONFIG_LV_USE_EXT_CLICK_AREA 1377 # define LV_USE_EXT_CLICK_AREA CONFIG_LV_USE_EXT_CLICK_AREA 1378 # else 1379 # define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_TINY 1380 # endif 1381 #endif 1382 1383 /*================== 1384 * LV OBJ X USAGE 1385 *================*/ 1386 /* 1387 * Documentation of the object types: https://docs.lvgl.com/#Object-types 1388 */ 1389 1390 /*Arc (dependencies: -)*/ 1391 #ifndef LV_USE_ARC 1392 # ifdef CONFIG_LV_USE_ARC 1393 # define LV_USE_ARC CONFIG_LV_USE_ARC 1394 # else 1395 # define LV_USE_ARC 1 1396 # endif 1397 #endif 1398 1399 /*Bar (dependencies: -)*/ 1400 #ifndef LV_USE_BAR 1401 # ifdef CONFIG_LV_USE_BAR 1402 # define LV_USE_BAR CONFIG_LV_USE_BAR 1403 # else 1404 # define LV_USE_BAR 1 1405 # endif 1406 #endif 1407 1408 /*Button (dependencies: lv_cont*/ 1409 #ifndef LV_USE_BTN 1410 # ifdef CONFIG_LV_USE_BTN 1411 # define LV_USE_BTN CONFIG_LV_USE_BTN 1412 # else 1413 # define LV_USE_BTN 1 1414 # endif 1415 #endif 1416 1417 /*Button matrix (dependencies: -)*/ 1418 #ifndef LV_USE_BTNMATRIX 1419 # ifdef CONFIG_LV_USE_BTNMATRIX 1420 # define LV_USE_BTNMATRIX CONFIG_LV_USE_BTNMATRIX 1421 # else 1422 # define LV_USE_BTNMATRIX 1 1423 # endif 1424 #endif 1425 1426 /*Calendar (dependencies: -)*/ 1427 #ifndef LV_USE_CALENDAR 1428 # ifdef CONFIG_LV_USE_CALENDAR 1429 # define LV_USE_CALENDAR CONFIG_LV_USE_CALENDAR 1430 # else 1431 # define LV_USE_CALENDAR 1 1432 # endif 1433 #endif 1434 #if LV_USE_CALENDAR 1435 #ifndef LV_CALENDAR_WEEK_STARTS_MONDAY 1436 # ifdef CONFIG_LV_CALENDAR_WEEK_STARTS_MONDAY 1437 # define LV_CALENDAR_WEEK_STARTS_MONDAY CONFIG_LV_CALENDAR_WEEK_STARTS_MONDAY 1438 # else 1439 # define LV_CALENDAR_WEEK_STARTS_MONDAY 0 1440 # endif 1441 #endif 1442 #endif 1443 1444 /*Canvas (dependencies: lv_img)*/ 1445 #ifndef LV_USE_CANVAS 1446 # ifdef CONFIG_LV_USE_CANVAS 1447 # define LV_USE_CANVAS CONFIG_LV_USE_CANVAS 1448 # else 1449 # define LV_USE_CANVAS 1 1450 # endif 1451 #endif 1452 1453 /*Check box (dependencies: lv_btn, lv_label)*/ 1454 #ifndef LV_USE_CHECKBOX 1455 # ifdef CONFIG_LV_USE_CHECKBOX 1456 # define LV_USE_CHECKBOX CONFIG_LV_USE_CHECKBOX 1457 # else 1458 # define LV_USE_CHECKBOX 1 1459 # endif 1460 #endif 1461 1462 /*Chart (dependencies: -)*/ 1463 #ifndef LV_USE_CHART 1464 # ifdef CONFIG_LV_USE_CHART 1465 # define LV_USE_CHART CONFIG_LV_USE_CHART 1466 # else 1467 # define LV_USE_CHART 1 1468 # endif 1469 #endif 1470 #if LV_USE_CHART 1471 #ifndef LV_CHART_AXIS_TICK_LABEL_MAX_LEN 1472 # ifdef CONFIG_LV_CHART_AXIS_TICK_LABEL_MAX_LEN 1473 # define LV_CHART_AXIS_TICK_LABEL_MAX_LEN CONFIG_LV_CHART_AXIS_TICK_LABEL_MAX_LEN 1474 # else 1475 # define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 256 1476 # endif 1477 #endif 1478 #endif 1479 1480 /*Container (dependencies: -*/ 1481 #ifndef LV_USE_CONT 1482 # ifdef CONFIG_LV_USE_CONT 1483 # define LV_USE_CONT CONFIG_LV_USE_CONT 1484 # else 1485 # define LV_USE_CONT 1 1486 # endif 1487 #endif 1488 1489 /*Color picker (dependencies: -*/ 1490 #ifndef LV_USE_CPICKER 1491 # ifdef CONFIG_LV_USE_CPICKER 1492 # define LV_USE_CPICKER CONFIG_LV_USE_CPICKER 1493 # else 1494 # define LV_USE_CPICKER 1 1495 # endif 1496 #endif 1497 1498 /*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ 1499 #ifndef LV_USE_DROPDOWN 1500 # ifdef CONFIG_LV_USE_DROPDOWN 1501 # define LV_USE_DROPDOWN CONFIG_LV_USE_DROPDOWN 1502 # else 1503 # define LV_USE_DROPDOWN 1 1504 # endif 1505 #endif 1506 #if LV_USE_DROPDOWN != 0 1507 /*Open and close default animation time [ms] (0: no animation)*/ 1508 #ifndef LV_DROPDOWN_DEF_ANIM_TIME 1509 # ifdef CONFIG_LV_DROPDOWN_DEF_ANIM_TIME 1510 # define LV_DROPDOWN_DEF_ANIM_TIME CONFIG_LV_DROPDOWN_DEF_ANIM_TIME 1511 # else 1512 # define LV_DROPDOWN_DEF_ANIM_TIME 200 1513 # endif 1514 #endif 1515 #endif 1516 1517 /*Gauge (dependencies:lv_bar, lv_linemeter)*/ 1518 #ifndef LV_USE_GAUGE 1519 # ifdef CONFIG_LV_USE_GAUGE 1520 # define LV_USE_GAUGE CONFIG_LV_USE_GAUGE 1521 # else 1522 # define LV_USE_GAUGE 1 1523 # endif 1524 #endif 1525 1526 /*Image (dependencies: lv_label*/ 1527 #ifndef LV_USE_IMG 1528 # ifdef CONFIG_LV_USE_IMG 1529 # define LV_USE_IMG CONFIG_LV_USE_IMG 1530 # else 1531 # define LV_USE_IMG 1 1532 # endif 1533 #endif 1534 1535 /*Image Button (dependencies: lv_btn*/ 1536 #ifndef LV_USE_IMGBTN 1537 # ifdef CONFIG_LV_USE_IMGBTN 1538 # define LV_USE_IMGBTN CONFIG_LV_USE_IMGBTN 1539 # else 1540 # define LV_USE_IMGBTN 1 1541 # endif 1542 #endif 1543 #if LV_USE_IMGBTN 1544 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ 1545 #ifndef LV_IMGBTN_TILED 1546 # ifdef CONFIG_LV_IMGBTN_TILED 1547 # define LV_IMGBTN_TILED CONFIG_LV_IMGBTN_TILED 1548 # else 1549 # define LV_IMGBTN_TILED 0 1550 # endif 1551 #endif 1552 #endif 1553 1554 /*Keyboard (dependencies: lv_btnm)*/ 1555 #ifndef LV_USE_KEYBOARD 1556 # ifdef CONFIG_LV_USE_KEYBOARD 1557 # define LV_USE_KEYBOARD CONFIG_LV_USE_KEYBOARD 1558 # else 1559 # define LV_USE_KEYBOARD 1 1560 # endif 1561 #endif 1562 1563 /*Label (dependencies: -*/ 1564 #ifndef LV_USE_LABEL 1565 # ifdef CONFIG_LV_USE_LABEL 1566 # define LV_USE_LABEL CONFIG_LV_USE_LABEL 1567 # else 1568 # define LV_USE_LABEL 1 1569 # endif 1570 #endif 1571 #if LV_USE_LABEL != 0 1572 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/ 1573 #ifndef LV_LABEL_DEF_SCROLL_SPEED 1574 # ifdef CONFIG_LV_LABEL_DEF_SCROLL_SPEED 1575 # define LV_LABEL_DEF_SCROLL_SPEED CONFIG_LV_LABEL_DEF_SCROLL_SPEED 1576 # else 1577 # define LV_LABEL_DEF_SCROLL_SPEED 25 1578 # endif 1579 #endif 1580 1581 /* Waiting period at beginning/end of animation cycle */ 1582 #ifndef LV_LABEL_WAIT_CHAR_COUNT 1583 # ifdef CONFIG_LV_LABEL_WAIT_CHAR_COUNT 1584 # define LV_LABEL_WAIT_CHAR_COUNT CONFIG_LV_LABEL_WAIT_CHAR_COUNT 1585 # else 1586 # define LV_LABEL_WAIT_CHAR_COUNT 3 1587 # endif 1588 #endif 1589 1590 /*Enable selecting text of the label */ 1591 #ifndef LV_LABEL_TEXT_SEL 1592 # ifdef CONFIG_LV_LABEL_TEXT_SEL 1593 # define LV_LABEL_TEXT_SEL CONFIG_LV_LABEL_TEXT_SEL 1594 # else 1595 # define LV_LABEL_TEXT_SEL 0 1596 # endif 1597 #endif 1598 1599 /*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/ 1600 #ifndef LV_LABEL_LONG_TXT_HINT 1601 # ifdef CONFIG_LV_LABEL_LONG_TXT_HINT 1602 # define LV_LABEL_LONG_TXT_HINT CONFIG_LV_LABEL_LONG_TXT_HINT 1603 # else 1604 # define LV_LABEL_LONG_TXT_HINT 0 1605 # endif 1606 #endif 1607 #endif 1608 1609 /*LED (dependencies: -)*/ 1610 #ifndef LV_USE_LED 1611 # ifdef CONFIG_LV_USE_LED 1612 # define LV_USE_LED CONFIG_LV_USE_LED 1613 # else 1614 # define LV_USE_LED 1 1615 # endif 1616 #endif 1617 #if LV_USE_LED 1618 #ifndef LV_LED_BRIGHT_MIN 1619 # ifdef CONFIG_LV_LED_BRIGHT_MIN 1620 # define LV_LED_BRIGHT_MIN CONFIG_LV_LED_BRIGHT_MIN 1621 # else 1622 # define LV_LED_BRIGHT_MIN 120 /*Minimal brightness*/ 1623 # endif 1624 #endif 1625 #ifndef LV_LED_BRIGHT_MAX 1626 # ifdef CONFIG_LV_LED_BRIGHT_MAX 1627 # define LV_LED_BRIGHT_MAX CONFIG_LV_LED_BRIGHT_MAX 1628 # else 1629 # define LV_LED_BRIGHT_MAX 255 /*Maximal brightness*/ 1630 # endif 1631 #endif 1632 #endif 1633 1634 /*Line (dependencies: -*/ 1635 #ifndef LV_USE_LINE 1636 # ifdef CONFIG_LV_USE_LINE 1637 # define LV_USE_LINE CONFIG_LV_USE_LINE 1638 # else 1639 # define LV_USE_LINE 1 1640 # endif 1641 #endif 1642 1643 /*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ 1644 #ifndef LV_USE_LIST 1645 # ifdef CONFIG_LV_USE_LIST 1646 # define LV_USE_LIST CONFIG_LV_USE_LIST 1647 # else 1648 # define LV_USE_LIST 1 1649 # endif 1650 #endif 1651 #if LV_USE_LIST != 0 1652 /*Default animation time of focusing to a list element [ms] (0: no animation) */ 1653 #ifndef LV_LIST_DEF_ANIM_TIME 1654 # ifdef CONFIG_LV_LIST_DEF_ANIM_TIME 1655 # define LV_LIST_DEF_ANIM_TIME CONFIG_LV_LIST_DEF_ANIM_TIME 1656 # else 1657 # define LV_LIST_DEF_ANIM_TIME 100 1658 # endif 1659 #endif 1660 #endif 1661 1662 /*Line meter (dependencies: *;)*/ 1663 #ifndef LV_USE_LINEMETER 1664 # ifdef CONFIG_LV_USE_LINEMETER 1665 # define LV_USE_LINEMETER CONFIG_LV_USE_LINEMETER 1666 # else 1667 # define LV_USE_LINEMETER 1 1668 # endif 1669 #endif 1670 #if LV_USE_LINEMETER 1671 /* Draw line more precisely at cost of performance. 1672 * Useful if there are lot of lines any minor are visible 1673 * 0: No extra precision 1674 * 1: Some extra precision 1675 * 2: Best precision 1676 */ 1677 #ifndef LV_LINEMETER_PRECISE 1678 # ifdef CONFIG_LV_LINEMETER_PRECISE 1679 # define LV_LINEMETER_PRECISE CONFIG_LV_LINEMETER_PRECISE 1680 # else 1681 # define LV_LINEMETER_PRECISE 1 1682 # endif 1683 #endif 1684 #endif 1685 1686 /*Mask (dependencies: -)*/ 1687 #ifndef LV_USE_OBJMASK 1688 # ifdef CONFIG_LV_USE_OBJMASK 1689 # define LV_USE_OBJMASK CONFIG_LV_USE_OBJMASK 1690 # else 1691 # define LV_USE_OBJMASK 1 1692 # endif 1693 #endif 1694 1695 /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ 1696 #ifndef LV_USE_MSGBOX 1697 # ifdef CONFIG_LV_USE_MSGBOX 1698 # define LV_USE_MSGBOX CONFIG_LV_USE_MSGBOX 1699 # else 1700 # define LV_USE_MSGBOX 1 1701 # endif 1702 #endif 1703 1704 /*Page (dependencies: lv_cont)*/ 1705 #ifndef LV_USE_PAGE 1706 # ifdef CONFIG_LV_USE_PAGE 1707 # define LV_USE_PAGE CONFIG_LV_USE_PAGE 1708 # else 1709 # define LV_USE_PAGE 1 1710 # endif 1711 #endif 1712 #if LV_USE_PAGE != 0 1713 /*Focus default animation time [ms] (0: no animation)*/ 1714 #ifndef LV_PAGE_DEF_ANIM_TIME 1715 # ifdef CONFIG_LV_PAGE_DEF_ANIM_TIME 1716 # define LV_PAGE_DEF_ANIM_TIME CONFIG_LV_PAGE_DEF_ANIM_TIME 1717 # else 1718 # define LV_PAGE_DEF_ANIM_TIME 400 1719 # endif 1720 #endif 1721 #endif 1722 1723 /*Preload (dependencies: lv_arc, lv_anim)*/ 1724 #ifndef LV_USE_SPINNER 1725 # ifdef CONFIG_LV_USE_SPINNER 1726 # define LV_USE_SPINNER CONFIG_LV_USE_SPINNER 1727 # else 1728 # define LV_USE_SPINNER 1 1729 # endif 1730 #endif 1731 #if LV_USE_SPINNER != 0 1732 #ifndef LV_SPINNER_DEF_ARC_LENGTH 1733 # ifdef CONFIG_LV_SPINNER_DEF_ARC_LENGTH 1734 # define LV_SPINNER_DEF_ARC_LENGTH CONFIG_LV_SPINNER_DEF_ARC_LENGTH 1735 # else 1736 # define LV_SPINNER_DEF_ARC_LENGTH 60 /*[deg]*/ 1737 # endif 1738 #endif 1739 #ifndef LV_SPINNER_DEF_SPIN_TIME 1740 # ifdef CONFIG_LV_SPINNER_DEF_SPIN_TIME 1741 # define LV_SPINNER_DEF_SPIN_TIME CONFIG_LV_SPINNER_DEF_SPIN_TIME 1742 # else 1743 # define LV_SPINNER_DEF_SPIN_TIME 1000 /*[ms]*/ 1744 # endif 1745 #endif 1746 #ifndef LV_SPINNER_DEF_ANIM 1747 # ifdef CONFIG_LV_SPINNER_DEF_ANIM 1748 # define LV_SPINNER_DEF_ANIM CONFIG_LV_SPINNER_DEF_ANIM 1749 # else 1750 # define LV_SPINNER_DEF_ANIM LV_SPINNER_TYPE_SPINNING_ARC 1751 # endif 1752 #endif 1753 #endif 1754 1755 /*Roller (dependencies: lv_ddlist)*/ 1756 #ifndef LV_USE_ROLLER 1757 # ifdef CONFIG_LV_USE_ROLLER 1758 # define LV_USE_ROLLER CONFIG_LV_USE_ROLLER 1759 # else 1760 # define LV_USE_ROLLER 1 1761 # endif 1762 #endif 1763 #if LV_USE_ROLLER != 0 1764 /*Focus animation time [ms] (0: no animation)*/ 1765 #ifndef LV_ROLLER_DEF_ANIM_TIME 1766 # ifdef CONFIG_LV_ROLLER_DEF_ANIM_TIME 1767 # define LV_ROLLER_DEF_ANIM_TIME CONFIG_LV_ROLLER_DEF_ANIM_TIME 1768 # else 1769 # define LV_ROLLER_DEF_ANIM_TIME 200 1770 # endif 1771 #endif 1772 1773 /*Number of extra "pages" when the roller is infinite*/ 1774 #ifndef LV_ROLLER_INF_PAGES 1775 # ifdef CONFIG_LV_ROLLER_INF_PAGES 1776 # define LV_ROLLER_INF_PAGES CONFIG_LV_ROLLER_INF_PAGES 1777 # else 1778 # define LV_ROLLER_INF_PAGES 7 1779 # endif 1780 #endif 1781 #endif 1782 1783 /*Slider (dependencies: lv_bar)*/ 1784 #ifndef LV_USE_SLIDER 1785 # ifdef CONFIG_LV_USE_SLIDER 1786 # define LV_USE_SLIDER CONFIG_LV_USE_SLIDER 1787 # else 1788 # define LV_USE_SLIDER 1 1789 # endif 1790 #endif 1791 1792 /*Spinbox (dependencies: lv_ta)*/ 1793 #ifndef LV_USE_SPINBOX 1794 # ifdef CONFIG_LV_USE_SPINBOX 1795 # define LV_USE_SPINBOX CONFIG_LV_USE_SPINBOX 1796 # else 1797 # define LV_USE_SPINBOX 1 1798 # endif 1799 #endif 1800 1801 /*Switch (dependencies: lv_slider)*/ 1802 #ifndef LV_USE_SWITCH 1803 # ifdef CONFIG_LV_USE_SWITCH 1804 # define LV_USE_SWITCH CONFIG_LV_USE_SWITCH 1805 # else 1806 # define LV_USE_SWITCH 1 1807 # endif 1808 #endif 1809 1810 /*Text area (dependencies: lv_label, lv_page)*/ 1811 #ifndef LV_USE_TEXTAREA 1812 # ifdef CONFIG_LV_USE_TEXTAREA 1813 # define LV_USE_TEXTAREA CONFIG_LV_USE_TEXTAREA 1814 # else 1815 # define LV_USE_TEXTAREA 1 1816 # endif 1817 #endif 1818 #if LV_USE_TEXTAREA != 0 1819 #ifndef LV_TEXTAREA_DEF_CURSOR_BLINK_TIME 1820 # ifdef CONFIG_LV_TEXTAREA_DEF_CURSOR_BLINK_TIME 1821 # define LV_TEXTAREA_DEF_CURSOR_BLINK_TIME CONFIG_LV_TEXTAREA_DEF_CURSOR_BLINK_TIME 1822 # else 1823 # define LV_TEXTAREA_DEF_CURSOR_BLINK_TIME 400 /*ms*/ 1824 # endif 1825 #endif 1826 #ifndef LV_TEXTAREA_DEF_PWD_SHOW_TIME 1827 # ifdef CONFIG_LV_TEXTAREA_DEF_PWD_SHOW_TIME 1828 # define LV_TEXTAREA_DEF_PWD_SHOW_TIME CONFIG_LV_TEXTAREA_DEF_PWD_SHOW_TIME 1829 # else 1830 # define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/ 1831 # endif 1832 #endif 1833 #endif 1834 1835 /*Table (dependencies: lv_label)*/ 1836 #ifndef LV_USE_TABLE 1837 # ifdef CONFIG_LV_USE_TABLE 1838 # define LV_USE_TABLE CONFIG_LV_USE_TABLE 1839 # else 1840 # define LV_USE_TABLE 1 1841 # endif 1842 #endif 1843 #if LV_USE_TABLE 1844 #ifndef LV_TABLE_COL_MAX 1845 # ifdef CONFIG_LV_TABLE_COL_MAX 1846 # define LV_TABLE_COL_MAX CONFIG_LV_TABLE_COL_MAX 1847 # else 1848 # define LV_TABLE_COL_MAX 12 1849 # endif 1850 #endif 1851 #endif 1852 1853 /*Tab (dependencies: lv_page, lv_btnm)*/ 1854 #ifndef LV_USE_TABVIEW 1855 # ifdef CONFIG_LV_USE_TABVIEW 1856 # define LV_USE_TABVIEW CONFIG_LV_USE_TABVIEW 1857 # else 1858 # define LV_USE_TABVIEW 1 1859 # endif 1860 #endif 1861 # if LV_USE_TABVIEW != 0 1862 /*Time of slide animation [ms] (0: no animation)*/ 1863 #ifndef LV_TABVIEW_DEF_ANIM_TIME 1864 # ifdef CONFIG_LV_TABVIEW_DEF_ANIM_TIME 1865 # define LV_TABVIEW_DEF_ANIM_TIME CONFIG_LV_TABVIEW_DEF_ANIM_TIME 1866 # else 1867 # define LV_TABVIEW_DEF_ANIM_TIME 300 1868 # endif 1869 #endif 1870 #endif 1871 1872 /*Tileview (dependencies: lv_page) */ 1873 #ifndef LV_USE_TILEVIEW 1874 # ifdef CONFIG_LV_USE_TILEVIEW 1875 # define LV_USE_TILEVIEW CONFIG_LV_USE_TILEVIEW 1876 # else 1877 # define LV_USE_TILEVIEW 1 1878 # endif 1879 #endif 1880 #if LV_USE_TILEVIEW 1881 /*Time of slide animation [ms] (0: no animation)*/ 1882 #ifndef LV_TILEVIEW_DEF_ANIM_TIME 1883 # ifdef CONFIG_LV_TILEVIEW_DEF_ANIM_TIME 1884 # define LV_TILEVIEW_DEF_ANIM_TIME CONFIG_LV_TILEVIEW_DEF_ANIM_TIME 1885 # else 1886 # define LV_TILEVIEW_DEF_ANIM_TIME 300 1887 # endif 1888 #endif 1889 #endif 1890 1891 /*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ 1892 #ifndef LV_USE_WIN 1893 # ifdef CONFIG_LV_USE_WIN 1894 # define LV_USE_WIN CONFIG_LV_USE_WIN 1895 # else 1896 # define LV_USE_WIN 1 1897 # endif 1898 #endif 1899 1900 /*================== 1901 * Non-user section 1902 *==================*/ 1903 1904 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/ 1905 #ifndef _CRT_SECURE_NO_WARNINGS 1906 # ifdef CONFIG__CRT_SECURE_NO_WARNINGS 1907 # define _CRT_SECURE_NO_WARNINGS CONFIG__CRT_SECURE_NO_WARNINGS 1908 # else 1909 # define _CRT_SECURE_NO_WARNINGS 1910 # endif 1911 #endif 1912 #endif 1913 1914 1915 1916 /*If running without lv_conf.h add typdesf with default value*/ 1917 #if defined(LV_CONF_SKIP) || defined(CONFIG_LV_CONF_SKIP) 1918 1919 /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ 1920 typedef int16_t lv_coord_t; 1921 1922 # if LV_USE_ANIMATION 1923 /*Declare the type of the user data of animations (can be e.g. `void *`, `int`, `struct`)*/ 1924 typedef void * lv_anim_user_data_t; 1925 # endif 1926 1927 # if LV_USE_GROUP 1928 typedef void * lv_group_user_data_t; 1929 # endif 1930 1931 # if LV_USE_FILESYSTEM 1932 typedef void * lv_fs_drv_user_data_t; 1933 # endif 1934 1935 typedef void * lv_img_decoder_user_data_t; 1936 1937 typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/ 1938 typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/ 1939 1940 typedef void * lv_font_user_data_t; 1941 1942 # if LV_USE_USER_DATA 1943 typedef void * lv_obj_user_data_t; 1944 # endif 1945 1946 #endif 1947 1948 #endif /*LV_CONF_INTERNAL_H*/ 1949