Boilerplate library to get started with LvGL on STM DISCO F746NG board. Adapted from https://os.mbed.com/users/JohnnyK/code/DISCO-F746NG_MbedOs_LvGL_example/

Dependencies:   BSP_DISCO_F746NG

Dependents:   LvGL_F746NG_test

Committer:
elelthvd
Date:
Thu Sep 10 09:24:23 2020 +0000
Revision:
1:a23fffad1321
Parent:
0:cffa136e7f8f
Add usage for Mbed Thread

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elelthvd 0:cffa136e7f8f 1 /**
elelthvd 0:cffa136e7f8f 2 * @file lv_conf.h
elelthvd 0:cffa136e7f8f 3 * Configuration file for LVGL v7.1.0
elelthvd 0:cffa136e7f8f 4 */
elelthvd 0:cffa136e7f8f 5
elelthvd 0:cffa136e7f8f 6 /*
elelthvd 0:cffa136e7f8f 7 * COPY THIS FILE AS `lv_conf.h` NEXT TO the `lvgl` FOLDER
elelthvd 0:cffa136e7f8f 8 */
elelthvd 0:cffa136e7f8f 9
elelthvd 0:cffa136e7f8f 10 #if 1 /*Set it to "1" to enable content*/
elelthvd 0:cffa136e7f8f 11
elelthvd 0:cffa136e7f8f 12 #ifndef LV_CONF_H
elelthvd 0:cffa136e7f8f 13 #define LV_CONF_H
elelthvd 0:cffa136e7f8f 14 /* clang-format off */
elelthvd 0:cffa136e7f8f 15
elelthvd 0:cffa136e7f8f 16 #include <stdint.h>
elelthvd 0:cffa136e7f8f 17
elelthvd 0:cffa136e7f8f 18 /*====================
elelthvd 0:cffa136e7f8f 19 Graphical settings
elelthvd 0:cffa136e7f8f 20 *====================*/
elelthvd 0:cffa136e7f8f 21
elelthvd 0:cffa136e7f8f 22 /* Maximal horizontal and vertical resolution to support by the library.*/
elelthvd 0:cffa136e7f8f 23 #if defined(TARGET_DISCO_F746NG)
elelthvd 0:cffa136e7f8f 24 #define LV_HOR_RES_MAX (480)
elelthvd 0:cffa136e7f8f 25 #define LV_VER_RES_MAX (272)
elelthvd 0:cffa136e7f8f 26 #elif defined(TARGET_DISCO_F469NI)
elelthvd 0:cffa136e7f8f 27 #define LV_HOR_RES_MAX (800)
elelthvd 0:cffa136e7f8f 28 #define LV_VER_RES_MAX (480)
elelthvd 0:cffa136e7f8f 29 #else
elelthvd 0:cffa136e7f8f 30 # error Error: You have not set resolution for your board!
elelthvd 0:cffa136e7f8f 31 #endif
elelthvd 0:cffa136e7f8f 32
elelthvd 0:cffa136e7f8f 33 /* Color depth:
elelthvd 0:cffa136e7f8f 34 * - 1: 1 byte per pixel
elelthvd 0:cffa136e7f8f 35 * - 8: RGB332
elelthvd 0:cffa136e7f8f 36 * - 16: RGB565
elelthvd 0:cffa136e7f8f 37 * - 32: ARGB8888
elelthvd 0:cffa136e7f8f 38 */
elelthvd 0:cffa136e7f8f 39 #define LV_COLOR_DEPTH 32
elelthvd 0:cffa136e7f8f 40
elelthvd 0:cffa136e7f8f 41 /* Swap the 2 bytes of RGB565 color.
elelthvd 0:cffa136e7f8f 42 * Useful if the display has a 8 bit interface (e.g. SPI)*/
elelthvd 0:cffa136e7f8f 43 #define LV_COLOR_16_SWAP 0
elelthvd 0:cffa136e7f8f 44
elelthvd 0:cffa136e7f8f 45 /* 1: Enable screen transparency.
elelthvd 0:cffa136e7f8f 46 * Useful for OSD or other overlapping GUIs.
elelthvd 0:cffa136e7f8f 47 * Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/
elelthvd 0:cffa136e7f8f 48 #define LV_COLOR_SCREEN_TRANSP 0
elelthvd 0:cffa136e7f8f 49
elelthvd 0:cffa136e7f8f 50 /*Images pixels with this color will not be drawn (with chroma keying)*/
elelthvd 0:cffa136e7f8f 51 #define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/
elelthvd 0:cffa136e7f8f 52
elelthvd 0:cffa136e7f8f 53 /* Enable anti-aliasing (lines, and radiuses will be smoothed) */
elelthvd 0:cffa136e7f8f 54 #define LV_ANTIALIAS 1
elelthvd 0:cffa136e7f8f 55
elelthvd 0:cffa136e7f8f 56 /* Default display refresh period.
elelthvd 0:cffa136e7f8f 57 * Can be changed in the display driver (`lv_disp_drv_t`).*/
elelthvd 0:cffa136e7f8f 58 #define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/
elelthvd 0:cffa136e7f8f 59
elelthvd 0:cffa136e7f8f 60 /* Dot Per Inch: used to initialize default sizes.
elelthvd 0:cffa136e7f8f 61 * E.g. a button with width = LV_DPI / 2 -> half inch wide
elelthvd 0:cffa136e7f8f 62 * (Not so important, you can adjust it to modify default sizes and spaces)*/
elelthvd 0:cffa136e7f8f 63 #define LV_DPI 100 /*100 is normal [px]*/
elelthvd 0:cffa136e7f8f 64
elelthvd 0:cffa136e7f8f 65 /* The the real width of the display changes some default values:
elelthvd 0:cffa136e7f8f 66 * default object sizes, layout of examples, etc.
elelthvd 0:cffa136e7f8f 67 * According to the width of the display (hor. res. / dpi)
elelthvd 0:cffa136e7f8f 68 * the displays fall in 4 categories.
elelthvd 0:cffa136e7f8f 69 * The 4th is extra large which has no upper limit so not listed here
elelthvd 0:cffa136e7f8f 70 * The upper limit of the categories are set below in 0.1 inch unit.
elelthvd 0:cffa136e7f8f 71 */
elelthvd 0:cffa136e7f8f 72 #define LV_DISP_SMALL_LIMIT 30
elelthvd 0:cffa136e7f8f 73 #define LV_DISP_MEDIUM_LIMIT 50
elelthvd 0:cffa136e7f8f 74 #define LV_DISP_LARGE_LIMIT 70
elelthvd 0:cffa136e7f8f 75
elelthvd 0:cffa136e7f8f 76 /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
elelthvd 0:cffa136e7f8f 77 typedef int16_t lv_coord_t;
elelthvd 0:cffa136e7f8f 78
elelthvd 0:cffa136e7f8f 79 /*=========================
elelthvd 0:cffa136e7f8f 80 Memory manager settings
elelthvd 0:cffa136e7f8f 81 *=========================*/
elelthvd 0:cffa136e7f8f 82
elelthvd 0:cffa136e7f8f 83 /* LittelvGL's internal memory manager's settings.
elelthvd 0:cffa136e7f8f 84 * The graphical objects and other related data are stored here. */
elelthvd 0:cffa136e7f8f 85
elelthvd 0:cffa136e7f8f 86 /* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */
elelthvd 0:cffa136e7f8f 87 #define LV_MEM_CUSTOM 0
elelthvd 0:cffa136e7f8f 88 #if LV_MEM_CUSTOM == 0
elelthvd 0:cffa136e7f8f 89 /* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
elelthvd 0:cffa136e7f8f 90 # define LV_MEM_SIZE (32U * 1024U)
elelthvd 0:cffa136e7f8f 91
elelthvd 0:cffa136e7f8f 92 /* Complier prefix for a big array declaration */
elelthvd 0:cffa136e7f8f 93 # define LV_MEM_ATTR
elelthvd 0:cffa136e7f8f 94
elelthvd 0:cffa136e7f8f 95 /* Set an address for the memory pool instead of allocating it as an array.
elelthvd 0:cffa136e7f8f 96 * Can be in external SRAM too. */
elelthvd 0:cffa136e7f8f 97 # define LV_MEM_ADR 0
elelthvd 0:cffa136e7f8f 98
elelthvd 0:cffa136e7f8f 99 /* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */
elelthvd 0:cffa136e7f8f 100 # define LV_MEM_AUTO_DEFRAG 1
elelthvd 0:cffa136e7f8f 101 #else /*LV_MEM_CUSTOM*/
elelthvd 0:cffa136e7f8f 102 # define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
elelthvd 0:cffa136e7f8f 103 # define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
elelthvd 0:cffa136e7f8f 104 # define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
elelthvd 0:cffa136e7f8f 105 #endif /*LV_MEM_CUSTOM*/
elelthvd 0:cffa136e7f8f 106
elelthvd 0:cffa136e7f8f 107 /* Garbage Collector settings
elelthvd 0:cffa136e7f8f 108 * Used if lvgl is binded to higher level language and the memory is managed by that language */
elelthvd 0:cffa136e7f8f 109 #define LV_ENABLE_GC 0
elelthvd 0:cffa136e7f8f 110 #if LV_ENABLE_GC != 0
elelthvd 0:cffa136e7f8f 111 # define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
elelthvd 0:cffa136e7f8f 112 # define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/
elelthvd 0:cffa136e7f8f 113 # define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/
elelthvd 0:cffa136e7f8f 114 #endif /* LV_ENABLE_GC */
elelthvd 0:cffa136e7f8f 115
elelthvd 0:cffa136e7f8f 116 /*=======================
elelthvd 0:cffa136e7f8f 117 Input device settings
elelthvd 0:cffa136e7f8f 118 *=======================*/
elelthvd 0:cffa136e7f8f 119
elelthvd 0:cffa136e7f8f 120 /* Input device default settings.
elelthvd 0:cffa136e7f8f 121 * Can be changed in the Input device driver (`lv_indev_drv_t`)*/
elelthvd 0:cffa136e7f8f 122
elelthvd 0:cffa136e7f8f 123 /* Input device read period in milliseconds */
elelthvd 0:cffa136e7f8f 124 #define LV_INDEV_DEF_READ_PERIOD 30
elelthvd 0:cffa136e7f8f 125
elelthvd 0:cffa136e7f8f 126 /* Drag threshold in pixels */
elelthvd 0:cffa136e7f8f 127 #define LV_INDEV_DEF_DRAG_LIMIT 10
elelthvd 0:cffa136e7f8f 128
elelthvd 0:cffa136e7f8f 129 /* Drag throw slow-down in [%]. Greater value -> faster slow-down */
elelthvd 0:cffa136e7f8f 130 #define LV_INDEV_DEF_DRAG_THROW 10
elelthvd 0:cffa136e7f8f 131
elelthvd 0:cffa136e7f8f 132 /* Long press time in milliseconds.
elelthvd 0:cffa136e7f8f 133 * Time to send `LV_EVENT_LONG_PRESSSED`) */
elelthvd 0:cffa136e7f8f 134 #define LV_INDEV_DEF_LONG_PRESS_TIME 400
elelthvd 0:cffa136e7f8f 135
elelthvd 0:cffa136e7f8f 136 /* Repeated trigger period in long press [ms]
elelthvd 0:cffa136e7f8f 137 * Time between `LV_EVENT_LONG_PRESSED_REPEAT */
elelthvd 0:cffa136e7f8f 138 #define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100
elelthvd 0:cffa136e7f8f 139
elelthvd 0:cffa136e7f8f 140
elelthvd 0:cffa136e7f8f 141 /* Gesture threshold in pixels */
elelthvd 0:cffa136e7f8f 142 #define LV_INDEV_DEF_GESTURE_LIMIT 50
elelthvd 0:cffa136e7f8f 143
elelthvd 0:cffa136e7f8f 144 /* Gesture min velocity at release before swipe (pixels)*/
elelthvd 0:cffa136e7f8f 145 #define LV_INDEV_DEF_GESTURE_MIN_VELOCITY 3
elelthvd 0:cffa136e7f8f 146
elelthvd 0:cffa136e7f8f 147 /*==================
elelthvd 0:cffa136e7f8f 148 * Feature usage
elelthvd 0:cffa136e7f8f 149 *==================*/
elelthvd 0:cffa136e7f8f 150
elelthvd 0:cffa136e7f8f 151 /*1: Enable the Animations */
elelthvd 0:cffa136e7f8f 152 #define LV_USE_ANIMATION 1
elelthvd 0:cffa136e7f8f 153 #if LV_USE_ANIMATION
elelthvd 0:cffa136e7f8f 154
elelthvd 0:cffa136e7f8f 155 /*Declare the type of the user data of animations (can be e.g. `void *`, `int`, `struct`)*/
elelthvd 0:cffa136e7f8f 156 typedef void * lv_anim_user_data_t;
elelthvd 0:cffa136e7f8f 157
elelthvd 0:cffa136e7f8f 158 #endif
elelthvd 0:cffa136e7f8f 159
elelthvd 0:cffa136e7f8f 160 /* 1: Enable shadow drawing*/
elelthvd 0:cffa136e7f8f 161 #define LV_USE_SHADOW 1
elelthvd 0:cffa136e7f8f 162 #if LV_USE_SHADOW
elelthvd 0:cffa136e7f8f 163 /* Allow buffering some shadow calculation
elelthvd 0:cffa136e7f8f 164 * LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer,
elelthvd 0:cffa136e7f8f 165 * where shadow size is `shadow_width + radius`
elelthvd 0:cffa136e7f8f 166 * Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
elelthvd 0:cffa136e7f8f 167 #define LV_SHADOW_CACHE_SIZE 0
elelthvd 0:cffa136e7f8f 168 #endif
elelthvd 0:cffa136e7f8f 169
elelthvd 0:cffa136e7f8f 170 /* 1: Use other blend modes than normal (`LV_BLEND_MODE_...`)*/
elelthvd 0:cffa136e7f8f 171 #define LV_USE_BLEND_MODES 1
elelthvd 0:cffa136e7f8f 172
elelthvd 0:cffa136e7f8f 173 /* 1: Use the `opa_scale` style property to set the opacity of an object and its children at once*/
elelthvd 0:cffa136e7f8f 174 #define LV_USE_OPA_SCALE 1
elelthvd 0:cffa136e7f8f 175
elelthvd 0:cffa136e7f8f 176 /* 1: Use image zoom and rotation*/
elelthvd 0:cffa136e7f8f 177 #define LV_USE_IMG_TRANSFORM 1
elelthvd 0:cffa136e7f8f 178
elelthvd 0:cffa136e7f8f 179 /* 1: Enable object groups (for keyboard/encoder navigation) */
elelthvd 0:cffa136e7f8f 180 #define LV_USE_GROUP 1
elelthvd 0:cffa136e7f8f 181 #if LV_USE_GROUP
elelthvd 0:cffa136e7f8f 182 typedef void * lv_group_user_data_t;
elelthvd 0:cffa136e7f8f 183 #endif /*LV_USE_GROUP*/
elelthvd 0:cffa136e7f8f 184
elelthvd 0:cffa136e7f8f 185 /* 1: Enable GPU interface*/
elelthvd 0:cffa136e7f8f 186 #define LV_USE_GPU 1 /*Only enables `gpu_fill_cb` and `gpu_blend_cb` in the disp. drv- */
elelthvd 0:cffa136e7f8f 187 #define LV_USE_GPU_STM32_DMA2D 0
elelthvd 0:cffa136e7f8f 188 /*If enabling LV_USE_GPU_STM32_DMA2D, LV_GPU_DMA2D_CMSIS_INCLUDE must be defined to include path of CMSIS header of target processor
elelthvd 0:cffa136e7f8f 189 e.g. "stm32f769xx.h" or "stm32f429xx.h" */
elelthvd 0:cffa136e7f8f 190 #define LV_GPU_DMA2D_CMSIS_INCLUDE "mbed-os/targets/TARGET_STM/TARGET_STM32F7/STM32Cube_FW/CMSIS/stm32f746xx.h"
elelthvd 0:cffa136e7f8f 191
elelthvd 0:cffa136e7f8f 192
elelthvd 0:cffa136e7f8f 193 /* 1: Enable file system (might be required for images */
elelthvd 0:cffa136e7f8f 194 #define LV_USE_FILESYSTEM 1
elelthvd 0:cffa136e7f8f 195 #if LV_USE_FILESYSTEM
elelthvd 0:cffa136e7f8f 196 /*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/
elelthvd 0:cffa136e7f8f 197 typedef void * lv_fs_drv_user_data_t;
elelthvd 0:cffa136e7f8f 198 #endif
elelthvd 0:cffa136e7f8f 199
elelthvd 0:cffa136e7f8f 200 /*1: Add a `user_data` to drivers and objects*/
elelthvd 0:cffa136e7f8f 201 #define LV_USE_USER_DATA 0
elelthvd 0:cffa136e7f8f 202
elelthvd 0:cffa136e7f8f 203 /*1: Show CPU usage and FPS count in the right bottom corner*/
elelthvd 0:cffa136e7f8f 204 #define LV_USE_PERF_MONITOR 0
elelthvd 0:cffa136e7f8f 205
elelthvd 0:cffa136e7f8f 206 /*1: Use the functions and types from the older API if possible */
elelthvd 0:cffa136e7f8f 207 #define LV_USE_API_EXTENSION_V6 1
elelthvd 0:cffa136e7f8f 208 #define LV_USE_API_EXTENSION_V7 1
elelthvd 0:cffa136e7f8f 209
elelthvd 0:cffa136e7f8f 210 /*========================
elelthvd 0:cffa136e7f8f 211 * Image decoder and cache
elelthvd 0:cffa136e7f8f 212 *========================*/
elelthvd 0:cffa136e7f8f 213
elelthvd 0:cffa136e7f8f 214 /* 1: Enable indexed (palette) images */
elelthvd 0:cffa136e7f8f 215 #define LV_IMG_CF_INDEXED 1
elelthvd 0:cffa136e7f8f 216
elelthvd 0:cffa136e7f8f 217 /* 1: Enable alpha indexed images */
elelthvd 0:cffa136e7f8f 218 #define LV_IMG_CF_ALPHA 1
elelthvd 0:cffa136e7f8f 219
elelthvd 0:cffa136e7f8f 220 /* Default image cache size. Image caching keeps the images opened.
elelthvd 0:cffa136e7f8f 221 * If only the built-in image formats are used there is no real advantage of caching.
elelthvd 0:cffa136e7f8f 222 * (I.e. no new image decoder is added)
elelthvd 0:cffa136e7f8f 223 * With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
elelthvd 0:cffa136e7f8f 224 * However the opened images might consume additional RAM.
elelthvd 0:cffa136e7f8f 225 * LV_IMG_CACHE_DEF_SIZE must be >= 1 */
elelthvd 0:cffa136e7f8f 226 #define LV_IMG_CACHE_DEF_SIZE 1
elelthvd 0:cffa136e7f8f 227
elelthvd 0:cffa136e7f8f 228 /*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/
elelthvd 0:cffa136e7f8f 229 typedef void * lv_img_decoder_user_data_t;
elelthvd 0:cffa136e7f8f 230
elelthvd 0:cffa136e7f8f 231 /*=====================
elelthvd 0:cffa136e7f8f 232 * Compiler settings
elelthvd 0:cffa136e7f8f 233 *====================*/
elelthvd 0:cffa136e7f8f 234
elelthvd 0:cffa136e7f8f 235 /* For big endian systems set to 1 */
elelthvd 0:cffa136e7f8f 236 #define LV_BIG_ENDIAN_SYSTEM 0
elelthvd 0:cffa136e7f8f 237
elelthvd 0:cffa136e7f8f 238 /* Define a custom attribute to `lv_tick_inc` function */
elelthvd 0:cffa136e7f8f 239 #define LV_ATTRIBUTE_TICK_INC
elelthvd 0:cffa136e7f8f 240
elelthvd 0:cffa136e7f8f 241 /* Define a custom attribute to `lv_task_handler` function */
elelthvd 0:cffa136e7f8f 242 #define LV_ATTRIBUTE_TASK_HANDLER
elelthvd 0:cffa136e7f8f 243
elelthvd 0:cffa136e7f8f 244 /* Define a custom attribute to `lv_disp_flush_ready` function */
elelthvd 0:cffa136e7f8f 245 #define LV_ATTRIBUTE_FLUSH_READY
elelthvd 0:cffa136e7f8f 246
elelthvd 0:cffa136e7f8f 247 /* With size optimization (-Os) the compiler might not align data to
elelthvd 0:cffa136e7f8f 248 * 4 or 8 byte boundary. This alignment will be explicitly applied where needed.
elelthvd 0:cffa136e7f8f 249 * E.g. __attribute__((aligned(4))) */
elelthvd 0:cffa136e7f8f 250 #define LV_ATTRIBUTE_MEM_ALIGN
elelthvd 0:cffa136e7f8f 251
elelthvd 0:cffa136e7f8f 252 /* Attribute to mark large constant arrays for example
elelthvd 0:cffa136e7f8f 253 * font's bitmaps */
elelthvd 0:cffa136e7f8f 254 #define LV_ATTRIBUTE_LARGE_CONST
elelthvd 0:cffa136e7f8f 255
elelthvd 0:cffa136e7f8f 256 /* Prefix performance critical functions to place them into a faster memory (e.g RAM)
elelthvd 0:cffa136e7f8f 257 * Uses 15-20 kB extra memory */
elelthvd 0:cffa136e7f8f 258 #define LV_ATTRIBUTE_FAST_MEM
elelthvd 0:cffa136e7f8f 259
elelthvd 0:cffa136e7f8f 260 /* Export integer constant to binding.
elelthvd 0:cffa136e7f8f 261 * This macro is used with constants in the form of LV_<CONST> that
elelthvd 0:cffa136e7f8f 262 * should also appear on lvgl binding API such as Micropython
elelthvd 0:cffa136e7f8f 263 *
elelthvd 0:cffa136e7f8f 264 * The default value just prevents a GCC warning.
elelthvd 0:cffa136e7f8f 265 */
elelthvd 0:cffa136e7f8f 266 #define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning
elelthvd 0:cffa136e7f8f 267
elelthvd 0:cffa136e7f8f 268 /* Prefix variables that are used in GPU accelerated operations, often these need to be
elelthvd 0:cffa136e7f8f 269 * placed in RAM sections that are DMA accessible */
elelthvd 0:cffa136e7f8f 270 #define LV_ATTRIBUTE_DMA
elelthvd 0:cffa136e7f8f 271
elelthvd 0:cffa136e7f8f 272 /*===================
elelthvd 0:cffa136e7f8f 273 * HAL settings
elelthvd 0:cffa136e7f8f 274 *==================*/
elelthvd 0:cffa136e7f8f 275
elelthvd 0:cffa136e7f8f 276 /* 1: use a custom tick source.
elelthvd 0:cffa136e7f8f 277 * It removes the need to manually update the tick with `lv_tick_inc`) */
elelthvd 0:cffa136e7f8f 278 #define LV_TICK_CUSTOM 0
elelthvd 0:cffa136e7f8f 279 #if LV_TICK_CUSTOM == 1
elelthvd 0:cffa136e7f8f 280 #define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
elelthvd 0:cffa136e7f8f 281 #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
elelthvd 0:cffa136e7f8f 282 #endif /*LV_TICK_CUSTOM*/
elelthvd 0:cffa136e7f8f 283
elelthvd 0:cffa136e7f8f 284 typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/
elelthvd 0:cffa136e7f8f 285 typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/
elelthvd 0:cffa136e7f8f 286
elelthvd 0:cffa136e7f8f 287 /*================
elelthvd 0:cffa136e7f8f 288 * Log settings
elelthvd 0:cffa136e7f8f 289 *===============*/
elelthvd 0:cffa136e7f8f 290
elelthvd 0:cffa136e7f8f 291 /*1: Enable the log module*/
elelthvd 0:cffa136e7f8f 292 #define LV_USE_LOG 0
elelthvd 0:cffa136e7f8f 293 #if LV_USE_LOG
elelthvd 0:cffa136e7f8f 294 /* How important log should be added:
elelthvd 0:cffa136e7f8f 295 * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
elelthvd 0:cffa136e7f8f 296 * LV_LOG_LEVEL_INFO Log important events
elelthvd 0:cffa136e7f8f 297 * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
elelthvd 0:cffa136e7f8f 298 * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
elelthvd 0:cffa136e7f8f 299 * LV_LOG_LEVEL_NONE Do not log anything
elelthvd 0:cffa136e7f8f 300 */
elelthvd 0:cffa136e7f8f 301 # define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
elelthvd 0:cffa136e7f8f 302
elelthvd 0:cffa136e7f8f 303 /* 1: Print the log with 'printf';
elelthvd 0:cffa136e7f8f 304 * 0: user need to register a callback with `lv_log_register_print_cb`*/
elelthvd 0:cffa136e7f8f 305 # define LV_LOG_PRINTF 0
elelthvd 0:cffa136e7f8f 306 #endif /*LV_USE_LOG*/
elelthvd 0:cffa136e7f8f 307
elelthvd 0:cffa136e7f8f 308 /*=================
elelthvd 0:cffa136e7f8f 309 * Debug settings
elelthvd 0:cffa136e7f8f 310 *================*/
elelthvd 0:cffa136e7f8f 311
elelthvd 0:cffa136e7f8f 312 /* If Debug is enabled LittelvGL validates the parameters of the functions.
elelthvd 0:cffa136e7f8f 313 * If an invalid parameter is found an error log message is printed and
elelthvd 0:cffa136e7f8f 314 * the MCU halts at the error. (`LV_USE_LOG` should be enabled)
elelthvd 0:cffa136e7f8f 315 * If you are debugging the MCU you can pause
elelthvd 0:cffa136e7f8f 316 * the debugger to see exactly where the issue is.
elelthvd 0:cffa136e7f8f 317 *
elelthvd 0:cffa136e7f8f 318 * The behavior of asserts can be overwritten by redefining them here.
elelthvd 0:cffa136e7f8f 319 * E.g. #define LV_ASSERT_MEM(p) <my_assert_code>
elelthvd 0:cffa136e7f8f 320 */
elelthvd 0:cffa136e7f8f 321 #define LV_USE_DEBUG 1
elelthvd 0:cffa136e7f8f 322 #if LV_USE_DEBUG
elelthvd 0:cffa136e7f8f 323
elelthvd 0:cffa136e7f8f 324 /*Check if the parameter is NULL. (Quite fast) */
elelthvd 0:cffa136e7f8f 325 #define LV_USE_ASSERT_NULL 1
elelthvd 0:cffa136e7f8f 326
elelthvd 0:cffa136e7f8f 327 /*Checks is the memory is successfully allocated or no. (Quite fast)*/
elelthvd 0:cffa136e7f8f 328 #define LV_USE_ASSERT_MEM 1
elelthvd 0:cffa136e7f8f 329
elelthvd 0:cffa136e7f8f 330 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/
elelthvd 0:cffa136e7f8f 331 #define LV_USE_ASSERT_MEM_INTEGRITY 0
elelthvd 0:cffa136e7f8f 332
elelthvd 0:cffa136e7f8f 333 /* Check the strings.
elelthvd 0:cffa136e7f8f 334 * Search for NULL, very long strings, invalid characters, and unnatural repetitions. (Slow)
elelthvd 0:cffa136e7f8f 335 * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
elelthvd 0:cffa136e7f8f 336 #define LV_USE_ASSERT_STR 0
elelthvd 0:cffa136e7f8f 337
elelthvd 0:cffa136e7f8f 338 /* Check NULL, the object's type and existence (e.g. not deleted). (Quite slow)
elelthvd 0:cffa136e7f8f 339 * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
elelthvd 0:cffa136e7f8f 340 #define LV_USE_ASSERT_OBJ 0
elelthvd 0:cffa136e7f8f 341
elelthvd 0:cffa136e7f8f 342 /*Check if the styles are properly initialized. (Fast)*/
elelthvd 0:cffa136e7f8f 343 #define LV_USE_ASSERT_STYLE 0
elelthvd 0:cffa136e7f8f 344
elelthvd 0:cffa136e7f8f 345 #endif /*LV_USE_DEBUG*/
elelthvd 0:cffa136e7f8f 346
elelthvd 0:cffa136e7f8f 347 /*==================
elelthvd 0:cffa136e7f8f 348 * FONT USAGE
elelthvd 0:cffa136e7f8f 349 *===================*/
elelthvd 0:cffa136e7f8f 350
elelthvd 0:cffa136e7f8f 351 /* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
elelthvd 0:cffa136e7f8f 352 * The symbols are available via `LV_SYMBOL_...` defines
elelthvd 0:cffa136e7f8f 353 * More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html
elelthvd 0:cffa136e7f8f 354 * To create a new font go to: https://lvgl.com/ttf-font-to-c-array
elelthvd 0:cffa136e7f8f 355 */
elelthvd 0:cffa136e7f8f 356
elelthvd 0:cffa136e7f8f 357 /* Montserrat fonts with bpp = 4
elelthvd 0:cffa136e7f8f 358 * https://fonts.google.com/specimen/Montserrat */
elelthvd 0:cffa136e7f8f 359 #define LV_FONT_MONTSERRAT_12 0
elelthvd 0:cffa136e7f8f 360 #define LV_FONT_MONTSERRAT_14 1
elelthvd 0:cffa136e7f8f 361 #define LV_FONT_MONTSERRAT_16 0
elelthvd 0:cffa136e7f8f 362 #define LV_FONT_MONTSERRAT_18 0
elelthvd 0:cffa136e7f8f 363 #define LV_FONT_MONTSERRAT_20 0
elelthvd 0:cffa136e7f8f 364 #define LV_FONT_MONTSERRAT_22 0
elelthvd 0:cffa136e7f8f 365 #define LV_FONT_MONTSERRAT_24 0
elelthvd 0:cffa136e7f8f 366 #define LV_FONT_MONTSERRAT_26 0
elelthvd 0:cffa136e7f8f 367 #define LV_FONT_MONTSERRAT_28 0
elelthvd 0:cffa136e7f8f 368 #define LV_FONT_MONTSERRAT_30 0
elelthvd 0:cffa136e7f8f 369 #define LV_FONT_MONTSERRAT_32 0
elelthvd 0:cffa136e7f8f 370 #define LV_FONT_MONTSERRAT_34 0
elelthvd 0:cffa136e7f8f 371 #define LV_FONT_MONTSERRAT_36 0
elelthvd 0:cffa136e7f8f 372 #define LV_FONT_MONTSERRAT_38 0
elelthvd 0:cffa136e7f8f 373 #define LV_FONT_MONTSERRAT_40 0
elelthvd 0:cffa136e7f8f 374 #define LV_FONT_MONTSERRAT_42 0
elelthvd 0:cffa136e7f8f 375 #define LV_FONT_MONTSERRAT_44 0
elelthvd 0:cffa136e7f8f 376 #define LV_FONT_MONTSERRAT_46 0
elelthvd 0:cffa136e7f8f 377 #define LV_FONT_MONTSERRAT_48 0
elelthvd 0:cffa136e7f8f 378
elelthvd 0:cffa136e7f8f 379 /* Demonstrate special features */
elelthvd 0:cffa136e7f8f 380 #define LV_FONT_MONTSERRAT_12_SUBPX 0
elelthvd 0:cffa136e7f8f 381 #define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
elelthvd 0:cffa136e7f8f 382 #define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, PErisan letters and all their forms*/
elelthvd 0:cffa136e7f8f 383 #define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/
elelthvd 0:cffa136e7f8f 384
elelthvd 0:cffa136e7f8f 385 /*Pixel perfect monospace font
elelthvd 0:cffa136e7f8f 386 * http://pelulamu.net/unscii/ */
elelthvd 0:cffa136e7f8f 387 #define LV_FONT_UNSCII_8 0
elelthvd 0:cffa136e7f8f 388
elelthvd 0:cffa136e7f8f 389 /* Optionally declare your custom fonts here.
elelthvd 0:cffa136e7f8f 390 * You can use these fonts as default font too
elelthvd 0:cffa136e7f8f 391 * and they will be available globally. E.g.
elelthvd 0:cffa136e7f8f 392 * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \
elelthvd 0:cffa136e7f8f 393 * LV_FONT_DECLARE(my_font_2)
elelthvd 0:cffa136e7f8f 394 */
elelthvd 0:cffa136e7f8f 395 #define LV_FONT_CUSTOM_DECLARE
elelthvd 0:cffa136e7f8f 396
elelthvd 0:cffa136e7f8f 397 /* Enable it if you have fonts with a lot of characters.
elelthvd 0:cffa136e7f8f 398 * The limit depends on the font size, font face and bpp
elelthvd 0:cffa136e7f8f 399 * but with > 10,000 characters if you see issues probably you need to enable it.*/
elelthvd 0:cffa136e7f8f 400 #define LV_FONT_FMT_TXT_LARGE 0
elelthvd 0:cffa136e7f8f 401
elelthvd 0:cffa136e7f8f 402 /* Set the pixel order of the display.
elelthvd 0:cffa136e7f8f 403 * Important only if "subpx fonts" are used.
elelthvd 0:cffa136e7f8f 404 * With "normal" font it doesn't matter.
elelthvd 0:cffa136e7f8f 405 */
elelthvd 0:cffa136e7f8f 406 #define LV_FONT_SUBPX_BGR 0
elelthvd 0:cffa136e7f8f 407
elelthvd 0:cffa136e7f8f 408 /*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/
elelthvd 0:cffa136e7f8f 409 typedef void * lv_font_user_data_t;
elelthvd 0:cffa136e7f8f 410
elelthvd 0:cffa136e7f8f 411 /*================
elelthvd 0:cffa136e7f8f 412 * THEME USAGE
elelthvd 0:cffa136e7f8f 413 *================*/
elelthvd 0:cffa136e7f8f 414
elelthvd 0:cffa136e7f8f 415 /*Always enable at least on theme*/
elelthvd 0:cffa136e7f8f 416
elelthvd 0:cffa136e7f8f 417 /* No theme, you can apply your styles as you need
elelthvd 0:cffa136e7f8f 418 * No flags. Set LV_THEME_DEFAULT_FLAG 0 */
elelthvd 0:cffa136e7f8f 419 #define LV_USE_THEME_EMPTY 1
elelthvd 0:cffa136e7f8f 420
elelthvd 0:cffa136e7f8f 421 /*Simple to the create your theme based on it
elelthvd 0:cffa136e7f8f 422 * No flags. Set LV_THEME_DEFAULT_FLAG 0 */
elelthvd 0:cffa136e7f8f 423 #define LV_USE_THEME_TEMPLATE 1
elelthvd 0:cffa136e7f8f 424
elelthvd 0:cffa136e7f8f 425 /* A fast and impressive theme.
elelthvd 0:cffa136e7f8f 426 * Flags:
elelthvd 0:cffa136e7f8f 427 * LV_THEME_MATERIAL_FLAG_LIGHT: light theme
elelthvd 0:cffa136e7f8f 428 * LV_THEME_MATERIAL_FLAG_DARK: dark theme*/
elelthvd 0:cffa136e7f8f 429 #define LV_USE_THEME_MATERIAL 1
elelthvd 0:cffa136e7f8f 430
elelthvd 0:cffa136e7f8f 431 /* Mono-color theme for monochrome displays.
elelthvd 0:cffa136e7f8f 432 * If LV_THEME_DEFAULT_COLOR_PRIMARY is LV_COLOR_BLACK the
elelthvd 0:cffa136e7f8f 433 * texts and borders will be black and the background will be
elelthvd 0:cffa136e7f8f 434 * white. Else the colors are inverted.
elelthvd 0:cffa136e7f8f 435 * No flags. Set LV_THEME_DEFAULT_FLAG 0 */
elelthvd 0:cffa136e7f8f 436 #define LV_USE_THEME_MONO 1
elelthvd 0:cffa136e7f8f 437
elelthvd 0:cffa136e7f8f 438 #define LV_THEME_DEFAULT_INCLUDE <stdint.h> /*Include a header for the init. function*/
elelthvd 0:cffa136e7f8f 439 #define LV_THEME_DEFAULT_INIT lv_theme_material_init
elelthvd 0:cffa136e7f8f 440 #define LV_THEME_DEFAULT_COLOR_PRIMARY lv_color_hex(0x01a2b1)
elelthvd 0:cffa136e7f8f 441 #define LV_THEME_DEFAULT_COLOR_SECONDARY lv_color_hex(0x44d1b6)
elelthvd 0:cffa136e7f8f 442 #define LV_THEME_DEFAULT_FLAG LV_THEME_MATERIAL_FLAG_LIGHT
elelthvd 0:cffa136e7f8f 443 #define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_14
elelthvd 0:cffa136e7f8f 444 #define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_14
elelthvd 0:cffa136e7f8f 445 #define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_14
elelthvd 0:cffa136e7f8f 446 #define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_14
elelthvd 0:cffa136e7f8f 447
elelthvd 0:cffa136e7f8f 448 /*=================
elelthvd 0:cffa136e7f8f 449 * Text settings
elelthvd 0:cffa136e7f8f 450 *=================*/
elelthvd 0:cffa136e7f8f 451
elelthvd 0:cffa136e7f8f 452 /* Select a character encoding for strings.
elelthvd 0:cffa136e7f8f 453 * Your IDE or editor should have the same character encoding
elelthvd 0:cffa136e7f8f 454 * - LV_TXT_ENC_UTF8
elelthvd 0:cffa136e7f8f 455 * - LV_TXT_ENC_ASCII
elelthvd 0:cffa136e7f8f 456 * */
elelthvd 0:cffa136e7f8f 457 #define LV_TXT_ENC LV_TXT_ENC_UTF8
elelthvd 0:cffa136e7f8f 458
elelthvd 0:cffa136e7f8f 459 /*Can break (wrap) texts on these chars*/
elelthvd 0:cffa136e7f8f 460 #define LV_TXT_BREAK_CHARS " ,.;:-_"
elelthvd 0:cffa136e7f8f 461
elelthvd 0:cffa136e7f8f 462 /* If a word is at least this long, will break wherever "prettiest"
elelthvd 0:cffa136e7f8f 463 * To disable, set to a value <= 0 */
elelthvd 0:cffa136e7f8f 464 #define LV_TXT_LINE_BREAK_LONG_LEN 0
elelthvd 0:cffa136e7f8f 465
elelthvd 0:cffa136e7f8f 466 /* Minimum number of characters in a long word to put on a line before a break.
elelthvd 0:cffa136e7f8f 467 * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
elelthvd 0:cffa136e7f8f 468 #define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
elelthvd 0:cffa136e7f8f 469
elelthvd 0:cffa136e7f8f 470 /* Minimum number of characters in a long word to put on a line after a break.
elelthvd 0:cffa136e7f8f 471 * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
elelthvd 0:cffa136e7f8f 472 #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
elelthvd 0:cffa136e7f8f 473
elelthvd 0:cffa136e7f8f 474 /* The control character to use for signalling text recoloring. */
elelthvd 0:cffa136e7f8f 475 #define LV_TXT_COLOR_CMD "#"
elelthvd 0:cffa136e7f8f 476
elelthvd 0:cffa136e7f8f 477 /* Support bidirectional texts.
elelthvd 0:cffa136e7f8f 478 * Allows mixing Left-to-Right and Right-to-Left texts.
elelthvd 0:cffa136e7f8f 479 * The direction will be processed according to the Unicode Bidirectioanl Algorithm:
elelthvd 0:cffa136e7f8f 480 * https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
elelthvd 0:cffa136e7f8f 481 #define LV_USE_BIDI 0
elelthvd 0:cffa136e7f8f 482 #if LV_USE_BIDI
elelthvd 0:cffa136e7f8f 483 /* Set the default direction. Supported values:
elelthvd 0:cffa136e7f8f 484 * `LV_BIDI_DIR_LTR` Left-to-Right
elelthvd 0:cffa136e7f8f 485 * `LV_BIDI_DIR_RTL` Right-to-Left
elelthvd 0:cffa136e7f8f 486 * `LV_BIDI_DIR_AUTO` detect texts base direction */
elelthvd 0:cffa136e7f8f 487 #define LV_BIDI_BASE_DIR_DEF LV_BIDI_DIR_AUTO
elelthvd 0:cffa136e7f8f 488 #endif
elelthvd 0:cffa136e7f8f 489
elelthvd 0:cffa136e7f8f 490 /* Enable Arabic/Persian processing
elelthvd 0:cffa136e7f8f 491 * In these languages characters should be replaced with
elelthvd 0:cffa136e7f8f 492 * an other form based on their position in the text */
elelthvd 0:cffa136e7f8f 493 #define LV_USE_ARABIC_PERSIAN_CHARS 0
elelthvd 0:cffa136e7f8f 494
elelthvd 0:cffa136e7f8f 495 /*Change the built in (v)snprintf functions*/
elelthvd 0:cffa136e7f8f 496 #define LV_SPRINTF_CUSTOM 0
elelthvd 0:cffa136e7f8f 497 #if LV_SPRINTF_CUSTOM
elelthvd 0:cffa136e7f8f 498 # define LV_SPRINTF_INCLUDE <stdio.h>
elelthvd 0:cffa136e7f8f 499 # define lv_snprintf snprintf
elelthvd 0:cffa136e7f8f 500 # define lv_vsnprintf vsnprintf
elelthvd 0:cffa136e7f8f 501 #else /*!LV_SPRINTF_CUSTOM*/
elelthvd 0:cffa136e7f8f 502 # define LV_SPRINTF_DISABLE_FLOAT 1
elelthvd 0:cffa136e7f8f 503 #endif /*LV_SPRINTF_CUSTOM*/
elelthvd 0:cffa136e7f8f 504
elelthvd 0:cffa136e7f8f 505 /*===================
elelthvd 0:cffa136e7f8f 506 * LV_OBJ SETTINGS
elelthvd 0:cffa136e7f8f 507 *==================*/
elelthvd 0:cffa136e7f8f 508
elelthvd 0:cffa136e7f8f 509 #if LV_USE_USER_DATA
elelthvd 0:cffa136e7f8f 510 /*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/
elelthvd 0:cffa136e7f8f 511 typedef void * lv_obj_user_data_t;
elelthvd 0:cffa136e7f8f 512 /*Provide a function to free user data*/
elelthvd 0:cffa136e7f8f 513 #define LV_USE_USER_DATA_FREE 0
elelthvd 0:cffa136e7f8f 514 #if LV_USE_USER_DATA_FREE
elelthvd 0:cffa136e7f8f 515 # define LV_USER_DATA_FREE_INCLUDE "something.h" /*Header for user data free function*/
elelthvd 0:cffa136e7f8f 516 /* Function prototype : void user_data_free(lv_obj_t * obj); */
elelthvd 0:cffa136e7f8f 517 # define LV_USER_DATA_FREE (user_data_free) /*Invoking for user data free function*/
elelthvd 0:cffa136e7f8f 518 #endif
elelthvd 0:cffa136e7f8f 519 #endif
elelthvd 0:cffa136e7f8f 520
elelthvd 0:cffa136e7f8f 521 /*1: enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/
elelthvd 0:cffa136e7f8f 522 #define LV_USE_OBJ_REALIGN 1
elelthvd 0:cffa136e7f8f 523
elelthvd 0:cffa136e7f8f 524 /* Enable to make the object clickable on a larger area.
elelthvd 0:cffa136e7f8f 525 * LV_EXT_CLICK_AREA_OFF or 0: Disable this feature
elelthvd 0:cffa136e7f8f 526 * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px)
elelthvd 0:cffa136e7f8f 527 * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px)
elelthvd 0:cffa136e7f8f 528 */
elelthvd 0:cffa136e7f8f 529 #define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF
elelthvd 0:cffa136e7f8f 530
elelthvd 0:cffa136e7f8f 531 /*==================
elelthvd 0:cffa136e7f8f 532 * LV OBJ X USAGE
elelthvd 0:cffa136e7f8f 533 *================*/
elelthvd 0:cffa136e7f8f 534 /*
elelthvd 0:cffa136e7f8f 535 * Documentation of the object types: https://docs.lvgl.com/#Object-types
elelthvd 0:cffa136e7f8f 536 */
elelthvd 0:cffa136e7f8f 537
elelthvd 0:cffa136e7f8f 538 /*Arc (dependencies: -)*/
elelthvd 0:cffa136e7f8f 539 #define LV_USE_ARC 1
elelthvd 0:cffa136e7f8f 540
elelthvd 0:cffa136e7f8f 541 /*Bar (dependencies: -)*/
elelthvd 0:cffa136e7f8f 542 #define LV_USE_BAR 1
elelthvd 0:cffa136e7f8f 543
elelthvd 0:cffa136e7f8f 544 /*Button (dependencies: lv_cont*/
elelthvd 0:cffa136e7f8f 545 #define LV_USE_BTN 1
elelthvd 0:cffa136e7f8f 546
elelthvd 0:cffa136e7f8f 547 /*Button matrix (dependencies: -)*/
elelthvd 0:cffa136e7f8f 548 #define LV_USE_BTNMATRIX 1
elelthvd 0:cffa136e7f8f 549
elelthvd 0:cffa136e7f8f 550 /*Calendar (dependencies: -)*/
elelthvd 0:cffa136e7f8f 551 #define LV_USE_CALENDAR 1
elelthvd 0:cffa136e7f8f 552 #if LV_USE_CALENDAR
elelthvd 0:cffa136e7f8f 553 # define LV_CALENDAR_WEEK_STARTS_MONDAY 0
elelthvd 0:cffa136e7f8f 554 #endif
elelthvd 0:cffa136e7f8f 555
elelthvd 0:cffa136e7f8f 556 /*Canvas (dependencies: lv_img)*/
elelthvd 0:cffa136e7f8f 557 #define LV_USE_CANVAS 1
elelthvd 0:cffa136e7f8f 558
elelthvd 0:cffa136e7f8f 559 /*Check box (dependencies: lv_btn, lv_label)*/
elelthvd 0:cffa136e7f8f 560 #define LV_USE_CHECKBOX 1
elelthvd 0:cffa136e7f8f 561
elelthvd 0:cffa136e7f8f 562 /*Chart (dependencies: -)*/
elelthvd 0:cffa136e7f8f 563 #define LV_USE_CHART 1
elelthvd 0:cffa136e7f8f 564 #if LV_USE_CHART
elelthvd 0:cffa136e7f8f 565 # define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 256
elelthvd 0:cffa136e7f8f 566 #endif
elelthvd 0:cffa136e7f8f 567
elelthvd 0:cffa136e7f8f 568 /*Container (dependencies: -*/
elelthvd 0:cffa136e7f8f 569 #define LV_USE_CONT 1
elelthvd 0:cffa136e7f8f 570
elelthvd 0:cffa136e7f8f 571 /*Color picker (dependencies: -*/
elelthvd 0:cffa136e7f8f 572 #define LV_USE_CPICKER 1
elelthvd 0:cffa136e7f8f 573
elelthvd 0:cffa136e7f8f 574 /*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
elelthvd 0:cffa136e7f8f 575 #define LV_USE_DROPDOWN 1
elelthvd 0:cffa136e7f8f 576 #if LV_USE_DROPDOWN != 0
elelthvd 0:cffa136e7f8f 577 /*Open and close default animation time [ms] (0: no animation)*/
elelthvd 0:cffa136e7f8f 578 # define LV_DROPDOWN_DEF_ANIM_TIME 200
elelthvd 0:cffa136e7f8f 579 #endif
elelthvd 0:cffa136e7f8f 580
elelthvd 0:cffa136e7f8f 581 /*Gauge (dependencies:lv_bar, lv_linemeter)*/
elelthvd 0:cffa136e7f8f 582 #define LV_USE_GAUGE 1
elelthvd 0:cffa136e7f8f 583
elelthvd 0:cffa136e7f8f 584 /*Image (dependencies: lv_label*/
elelthvd 0:cffa136e7f8f 585 #define LV_USE_IMG 1
elelthvd 0:cffa136e7f8f 586
elelthvd 0:cffa136e7f8f 587 /*Image Button (dependencies: lv_btn*/
elelthvd 0:cffa136e7f8f 588 #define LV_USE_IMGBTN 1
elelthvd 0:cffa136e7f8f 589 #if LV_USE_IMGBTN
elelthvd 0:cffa136e7f8f 590 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/
elelthvd 0:cffa136e7f8f 591 # define LV_IMGBTN_TILED 0
elelthvd 0:cffa136e7f8f 592 #endif
elelthvd 0:cffa136e7f8f 593
elelthvd 0:cffa136e7f8f 594 /*Keyboard (dependencies: lv_btnm)*/
elelthvd 0:cffa136e7f8f 595 #define LV_USE_KEYBOARD 1
elelthvd 0:cffa136e7f8f 596
elelthvd 0:cffa136e7f8f 597 /*Label (dependencies: -*/
elelthvd 0:cffa136e7f8f 598 #define LV_USE_LABEL 1
elelthvd 0:cffa136e7f8f 599 #if LV_USE_LABEL != 0
elelthvd 0:cffa136e7f8f 600 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/
elelthvd 0:cffa136e7f8f 601 # define LV_LABEL_DEF_SCROLL_SPEED 25
elelthvd 0:cffa136e7f8f 602
elelthvd 0:cffa136e7f8f 603 /* Waiting period at beginning/end of animation cycle */
elelthvd 0:cffa136e7f8f 604 # define LV_LABEL_WAIT_CHAR_COUNT 3
elelthvd 0:cffa136e7f8f 605
elelthvd 0:cffa136e7f8f 606 /*Enable selecting text of the label */
elelthvd 0:cffa136e7f8f 607 # define LV_LABEL_TEXT_SEL 0
elelthvd 0:cffa136e7f8f 608
elelthvd 0:cffa136e7f8f 609 /*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/
elelthvd 0:cffa136e7f8f 610 # define LV_LABEL_LONG_TXT_HINT 0
elelthvd 0:cffa136e7f8f 611 #endif
elelthvd 0:cffa136e7f8f 612
elelthvd 0:cffa136e7f8f 613 /*LED (dependencies: -)*/
elelthvd 0:cffa136e7f8f 614 #define LV_USE_LED 1
elelthvd 0:cffa136e7f8f 615 #if LV_USE_LED
elelthvd 0:cffa136e7f8f 616 # define LV_LED_BRIGHT_MIN 120 /*Minimal brightness*/
elelthvd 0:cffa136e7f8f 617 # define LV_LED_BRIGHT_MAX 255 /*Maximal brightness*/
elelthvd 0:cffa136e7f8f 618 #endif
elelthvd 0:cffa136e7f8f 619
elelthvd 0:cffa136e7f8f 620 /*Line (dependencies: -*/
elelthvd 0:cffa136e7f8f 621 #define LV_USE_LINE 1
elelthvd 0:cffa136e7f8f 622
elelthvd 0:cffa136e7f8f 623 /*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/
elelthvd 0:cffa136e7f8f 624 #define LV_USE_LIST 1
elelthvd 0:cffa136e7f8f 625 #if LV_USE_LIST != 0
elelthvd 0:cffa136e7f8f 626 /*Default animation time of focusing to a list element [ms] (0: no animation) */
elelthvd 0:cffa136e7f8f 627 # define LV_LIST_DEF_ANIM_TIME 100
elelthvd 0:cffa136e7f8f 628 #endif
elelthvd 0:cffa136e7f8f 629
elelthvd 0:cffa136e7f8f 630 /*Line meter (dependencies: *;)*/
elelthvd 0:cffa136e7f8f 631 #define LV_USE_LINEMETER 1
elelthvd 0:cffa136e7f8f 632 #if LV_USE_LINEMETER
elelthvd 0:cffa136e7f8f 633 /* Draw line more precisely at cost of performance.
elelthvd 0:cffa136e7f8f 634 * Useful if there are lot of lines any minor are visible
elelthvd 0:cffa136e7f8f 635 * 0: No extra precision
elelthvd 0:cffa136e7f8f 636 * 1: Some extra precision
elelthvd 0:cffa136e7f8f 637 * 2: Best precision
elelthvd 0:cffa136e7f8f 638 */
elelthvd 0:cffa136e7f8f 639 # define LV_LINEMETER_PRECISE 0
elelthvd 0:cffa136e7f8f 640 #endif
elelthvd 0:cffa136e7f8f 641
elelthvd 0:cffa136e7f8f 642 /*Mask (dependencies: -)*/
elelthvd 0:cffa136e7f8f 643 #define LV_USE_OBJMASK 1
elelthvd 0:cffa136e7f8f 644
elelthvd 0:cffa136e7f8f 645 /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
elelthvd 0:cffa136e7f8f 646 #define LV_USE_MSGBOX 1
elelthvd 0:cffa136e7f8f 647
elelthvd 0:cffa136e7f8f 648 /*Page (dependencies: lv_cont)*/
elelthvd 0:cffa136e7f8f 649 #define LV_USE_PAGE 1
elelthvd 0:cffa136e7f8f 650 #if LV_USE_PAGE != 0
elelthvd 0:cffa136e7f8f 651 /*Focus default animation time [ms] (0: no animation)*/
elelthvd 0:cffa136e7f8f 652 # define LV_PAGE_DEF_ANIM_TIME 400
elelthvd 0:cffa136e7f8f 653 #endif
elelthvd 0:cffa136e7f8f 654
elelthvd 0:cffa136e7f8f 655 /*Preload (dependencies: lv_arc, lv_anim)*/
elelthvd 0:cffa136e7f8f 656 #define LV_USE_SPINNER 1
elelthvd 0:cffa136e7f8f 657 #if LV_USE_SPINNER != 0
elelthvd 0:cffa136e7f8f 658 # define LV_SPINNER_DEF_ARC_LENGTH 60 /*[deg]*/
elelthvd 0:cffa136e7f8f 659 # define LV_SPINNER_DEF_SPIN_TIME 1000 /*[ms]*/
elelthvd 0:cffa136e7f8f 660 # define LV_SPINNER_DEF_ANIM LV_SPINNER_TYPE_SPINNING_ARC
elelthvd 0:cffa136e7f8f 661 #endif
elelthvd 0:cffa136e7f8f 662
elelthvd 0:cffa136e7f8f 663 /*Roller (dependencies: lv_ddlist)*/
elelthvd 0:cffa136e7f8f 664 #define LV_USE_ROLLER 1
elelthvd 0:cffa136e7f8f 665 #if LV_USE_ROLLER != 0
elelthvd 0:cffa136e7f8f 666 /*Focus animation time [ms] (0: no animation)*/
elelthvd 0:cffa136e7f8f 667 # define LV_ROLLER_DEF_ANIM_TIME 200
elelthvd 0:cffa136e7f8f 668
elelthvd 0:cffa136e7f8f 669 /*Number of extra "pages" when the roller is infinite*/
elelthvd 0:cffa136e7f8f 670 # define LV_ROLLER_INF_PAGES 7
elelthvd 0:cffa136e7f8f 671 #endif
elelthvd 0:cffa136e7f8f 672
elelthvd 0:cffa136e7f8f 673 /*Slider (dependencies: lv_bar)*/
elelthvd 0:cffa136e7f8f 674 #define LV_USE_SLIDER 1
elelthvd 0:cffa136e7f8f 675
elelthvd 0:cffa136e7f8f 676 /*Spinbox (dependencies: lv_ta)*/
elelthvd 0:cffa136e7f8f 677 #define LV_USE_SPINBOX 1
elelthvd 0:cffa136e7f8f 678
elelthvd 0:cffa136e7f8f 679 /*Switch (dependencies: lv_slider)*/
elelthvd 0:cffa136e7f8f 680 #define LV_USE_SWITCH 1
elelthvd 0:cffa136e7f8f 681
elelthvd 0:cffa136e7f8f 682 /*Text area (dependencies: lv_label, lv_page)*/
elelthvd 0:cffa136e7f8f 683 #define LV_USE_TEXTAREA 1
elelthvd 0:cffa136e7f8f 684 #if LV_USE_TEXTAREA != 0
elelthvd 0:cffa136e7f8f 685 # define LV_TEXTAREA_DEF_CURSOR_BLINK_TIME 400 /*ms*/
elelthvd 0:cffa136e7f8f 686 # define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/
elelthvd 0:cffa136e7f8f 687 #endif
elelthvd 0:cffa136e7f8f 688
elelthvd 0:cffa136e7f8f 689 /*Table (dependencies: lv_label)*/
elelthvd 0:cffa136e7f8f 690 #define LV_USE_TABLE 1
elelthvd 0:cffa136e7f8f 691 #if LV_USE_TABLE
elelthvd 0:cffa136e7f8f 692 # define LV_TABLE_COL_MAX 12
elelthvd 0:cffa136e7f8f 693 #endif
elelthvd 0:cffa136e7f8f 694
elelthvd 0:cffa136e7f8f 695 /*Tab (dependencies: lv_page, lv_btnm)*/
elelthvd 0:cffa136e7f8f 696 #define LV_USE_TABVIEW 1
elelthvd 0:cffa136e7f8f 697 # if LV_USE_TABVIEW != 0
elelthvd 0:cffa136e7f8f 698 /*Time of slide animation [ms] (0: no animation)*/
elelthvd 0:cffa136e7f8f 699 # define LV_TABVIEW_DEF_ANIM_TIME 300
elelthvd 0:cffa136e7f8f 700 #endif
elelthvd 0:cffa136e7f8f 701
elelthvd 0:cffa136e7f8f 702 /*Tileview (dependencies: lv_page) */
elelthvd 0:cffa136e7f8f 703 #define LV_USE_TILEVIEW 1
elelthvd 0:cffa136e7f8f 704 #if LV_USE_TILEVIEW
elelthvd 0:cffa136e7f8f 705 /*Time of slide animation [ms] (0: no animation)*/
elelthvd 0:cffa136e7f8f 706 # define LV_TILEVIEW_DEF_ANIM_TIME 300
elelthvd 0:cffa136e7f8f 707 #endif
elelthvd 0:cffa136e7f8f 708
elelthvd 0:cffa136e7f8f 709 /*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
elelthvd 0:cffa136e7f8f 710 #define LV_USE_WIN 1
elelthvd 0:cffa136e7f8f 711
elelthvd 0:cffa136e7f8f 712 /*==================
elelthvd 0:cffa136e7f8f 713 * Non-user section
elelthvd 0:cffa136e7f8f 714 *==================*/
elelthvd 0:cffa136e7f8f 715
elelthvd 0:cffa136e7f8f 716 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/
elelthvd 0:cffa136e7f8f 717 # define _CRT_SECURE_NO_WARNINGS
elelthvd 0:cffa136e7f8f 718 #endif
elelthvd 0:cffa136e7f8f 719
elelthvd 0:cffa136e7f8f 720 /*--END OF LV_CONF_H--*/
elelthvd 0:cffa136e7f8f 721
elelthvd 0:cffa136e7f8f 722 #endif /*LV_CONF_H*/
elelthvd 0:cffa136e7f8f 723
elelthvd 0:cffa136e7f8f 724 #endif /*End of "Content enable"*/
elelthvd 0:cffa136e7f8f 725