Example of using the LittlevGL with the MbedOS (bare metal) on the Disco-F746NG board and also the GPU STM32 chrom-art accelerator is used

Dependencies:   BSP_DISCO_F746NG

Committer:
JohnnyK
Date:
Tue Apr 07 08:06:45 2020 +0000
Revision:
2:afc050526249
Parent:
0:10c4b83c458d
add link to a Notebook page

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JohnnyK 0:10c4b83c458d 1 /**
JohnnyK 0:10c4b83c458d 2 * @file lv_conf.h
JohnnyK 0:10c4b83c458d 3 *
JohnnyK 0:10c4b83c458d 4 */
JohnnyK 0:10c4b83c458d 5
JohnnyK 0:10c4b83c458d 6 /*
JohnnyK 0:10c4b83c458d 7 * COPY THIS FILE AS `lv_conf.h` NEXT TO the `lvgl` FOLDER
JohnnyK 0:10c4b83c458d 8 */
JohnnyK 0:10c4b83c458d 9
JohnnyK 0:10c4b83c458d 10 #if 1 /*Set it to "1" to enable content*/
JohnnyK 0:10c4b83c458d 11
JohnnyK 0:10c4b83c458d 12 #ifndef LV_CONF_H
JohnnyK 0:10c4b83c458d 13 #define LV_CONF_H
JohnnyK 0:10c4b83c458d 14 /* clang-format off */
JohnnyK 0:10c4b83c458d 15
JohnnyK 0:10c4b83c458d 16 #include <stdint.h>
JohnnyK 0:10c4b83c458d 17
JohnnyK 0:10c4b83c458d 18 /*====================
JohnnyK 0:10c4b83c458d 19 Graphical settings
JohnnyK 0:10c4b83c458d 20 *====================*/
JohnnyK 0:10c4b83c458d 21
JohnnyK 0:10c4b83c458d 22 /* Maximal horizontal and vertical resolution to support by the library.*/
JohnnyK 0:10c4b83c458d 23 #if defined(TARGET_DISCO_F746NG)
JohnnyK 0:10c4b83c458d 24 #define LV_HOR_RES_MAX (480)
JohnnyK 0:10c4b83c458d 25 #define LV_VER_RES_MAX (272)
JohnnyK 0:10c4b83c458d 26 #elif defined(TARGET_DISCO_F469NI)
JohnnyK 0:10c4b83c458d 27 #define LV_HOR_RES_MAX (800)
JohnnyK 0:10c4b83c458d 28 #define LV_VER_RES_MAX (480)
JohnnyK 0:10c4b83c458d 29 #else
JohnnyK 0:10c4b83c458d 30 # error Error: You have not set resolution for your board!
JohnnyK 0:10c4b83c458d 31 #endif
JohnnyK 0:10c4b83c458d 32
JohnnyK 0:10c4b83c458d 33 /* Color depth:
JohnnyK 0:10c4b83c458d 34 * - 1: 1 byte per pixel
JohnnyK 0:10c4b83c458d 35 * - 8: RGB233
JohnnyK 0:10c4b83c458d 36 * - 16: RGB565
JohnnyK 0:10c4b83c458d 37 * - 32: ARGB8888
JohnnyK 0:10c4b83c458d 38 */
JohnnyK 0:10c4b83c458d 39 #define LV_COLOR_DEPTH 32
JohnnyK 0:10c4b83c458d 40
JohnnyK 0:10c4b83c458d 41 /* Swap the 2 bytes of RGB565 color.
JohnnyK 0:10c4b83c458d 42 * Useful if the display has a 8 bit interface (e.g. SPI)*/
JohnnyK 0:10c4b83c458d 43 #define LV_COLOR_16_SWAP 0
JohnnyK 0:10c4b83c458d 44
JohnnyK 0:10c4b83c458d 45 /* 1: Enable screen transparency.
JohnnyK 0:10c4b83c458d 46 * Useful for OSD or other overlapping GUIs.
JohnnyK 0:10c4b83c458d 47 * Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/
JohnnyK 0:10c4b83c458d 48 #define LV_COLOR_SCREEN_TRANSP 0
JohnnyK 0:10c4b83c458d 49
JohnnyK 0:10c4b83c458d 50 /*Images pixels with this color will not be drawn (with chroma keying)*/
JohnnyK 0:10c4b83c458d 51 #define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/
JohnnyK 0:10c4b83c458d 52
JohnnyK 0:10c4b83c458d 53 /* Enable anti-aliasing (lines, and radiuses will be smoothed) */
JohnnyK 0:10c4b83c458d 54 #define LV_ANTIALIAS 1
JohnnyK 0:10c4b83c458d 55
JohnnyK 0:10c4b83c458d 56 /* Default display refresh period.
JohnnyK 0:10c4b83c458d 57 * Can be changed in the display driver (`lv_disp_drv_t`).*/
JohnnyK 0:10c4b83c458d 58 #define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/
JohnnyK 0:10c4b83c458d 59
JohnnyK 0:10c4b83c458d 60 /* Dot Per Inch: used to initialize default sizes.
JohnnyK 0:10c4b83c458d 61 * E.g. a button with width = LV_DPI / 2 -> half inch wide
JohnnyK 0:10c4b83c458d 62 * (Not so important, you can adjust it to modify default sizes and spaces)*/
JohnnyK 0:10c4b83c458d 63 #define LV_DPI 100 /*[px]*/
JohnnyK 0:10c4b83c458d 64
JohnnyK 0:10c4b83c458d 65 /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
JohnnyK 0:10c4b83c458d 66 typedef int16_t lv_coord_t;
JohnnyK 0:10c4b83c458d 67
JohnnyK 0:10c4b83c458d 68 /*=========================
JohnnyK 0:10c4b83c458d 69 Memory manager settings
JohnnyK 0:10c4b83c458d 70 *=========================*/
JohnnyK 0:10c4b83c458d 71
JohnnyK 0:10c4b83c458d 72 /* LittelvGL's internal memory manager's settings.
JohnnyK 0:10c4b83c458d 73 * The graphical objects and other related data are stored here. */
JohnnyK 0:10c4b83c458d 74
JohnnyK 0:10c4b83c458d 75 /* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */
JohnnyK 0:10c4b83c458d 76 #define LV_MEM_CUSTOM 0
JohnnyK 0:10c4b83c458d 77 #if LV_MEM_CUSTOM == 0
JohnnyK 0:10c4b83c458d 78 /* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
JohnnyK 0:10c4b83c458d 79 # define LV_MEM_SIZE (32U * 1024U)
JohnnyK 0:10c4b83c458d 80
JohnnyK 0:10c4b83c458d 81 /* Complier prefix for a big array declaration */
JohnnyK 0:10c4b83c458d 82 # define LV_MEM_ATTR
JohnnyK 0:10c4b83c458d 83
JohnnyK 0:10c4b83c458d 84 /* Set an address for the memory pool instead of allocating it as an array.
JohnnyK 0:10c4b83c458d 85 * Can be in external SRAM too. */
JohnnyK 0:10c4b83c458d 86 # define LV_MEM_ADR 0
JohnnyK 0:10c4b83c458d 87
JohnnyK 0:10c4b83c458d 88 /* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */
JohnnyK 0:10c4b83c458d 89 # define LV_MEM_AUTO_DEFRAG 1
JohnnyK 0:10c4b83c458d 90 #else /*LV_MEM_CUSTOM*/
JohnnyK 0:10c4b83c458d 91 # define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
JohnnyK 0:10c4b83c458d 92 # define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
JohnnyK 0:10c4b83c458d 93 # define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
JohnnyK 0:10c4b83c458d 94 #endif /*LV_MEM_CUSTOM*/
JohnnyK 0:10c4b83c458d 95
JohnnyK 0:10c4b83c458d 96 /* Garbage Collector settings
JohnnyK 0:10c4b83c458d 97 * Used if lvgl is binded to higher level language and the memory is managed by that language */
JohnnyK 0:10c4b83c458d 98 #define LV_ENABLE_GC 0
JohnnyK 0:10c4b83c458d 99 #if LV_ENABLE_GC != 0
JohnnyK 0:10c4b83c458d 100 # define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
JohnnyK 0:10c4b83c458d 101 # define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/
JohnnyK 0:10c4b83c458d 102 # define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/
JohnnyK 0:10c4b83c458d 103 #endif /* LV_ENABLE_GC */
JohnnyK 0:10c4b83c458d 104
JohnnyK 0:10c4b83c458d 105 /*=======================
JohnnyK 0:10c4b83c458d 106 Input device settings
JohnnyK 0:10c4b83c458d 107 *=======================*/
JohnnyK 0:10c4b83c458d 108
JohnnyK 0:10c4b83c458d 109 /* Input device default settings.
JohnnyK 0:10c4b83c458d 110 * Can be changed in the Input device driver (`lv_indev_drv_t`)*/
JohnnyK 0:10c4b83c458d 111
JohnnyK 0:10c4b83c458d 112 /* Input device read period in milliseconds */
JohnnyK 0:10c4b83c458d 113 #define LV_INDEV_DEF_READ_PERIOD 30
JohnnyK 0:10c4b83c458d 114
JohnnyK 0:10c4b83c458d 115 /* Drag threshold in pixels */
JohnnyK 0:10c4b83c458d 116 #define LV_INDEV_DEF_DRAG_LIMIT 10
JohnnyK 0:10c4b83c458d 117
JohnnyK 0:10c4b83c458d 118 /* Drag throw slow-down in [%]. Greater value -> faster slow-down */
JohnnyK 0:10c4b83c458d 119 #define LV_INDEV_DEF_DRAG_THROW 20
JohnnyK 0:10c4b83c458d 120
JohnnyK 0:10c4b83c458d 121 /* Long press time in milliseconds.
JohnnyK 0:10c4b83c458d 122 * Time to send `LV_EVENT_LONG_PRESSSED`) */
JohnnyK 0:10c4b83c458d 123 #define LV_INDEV_DEF_LONG_PRESS_TIME 400
JohnnyK 0:10c4b83c458d 124
JohnnyK 0:10c4b83c458d 125 /* Repeated trigger period in long press [ms]
JohnnyK 0:10c4b83c458d 126 * Time between `LV_EVENT_LONG_PRESSED_REPEAT */
JohnnyK 0:10c4b83c458d 127 #define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100
JohnnyK 0:10c4b83c458d 128
JohnnyK 0:10c4b83c458d 129 /*==================
JohnnyK 0:10c4b83c458d 130 * Feature usage
JohnnyK 0:10c4b83c458d 131 *==================*/
JohnnyK 0:10c4b83c458d 132
JohnnyK 0:10c4b83c458d 133 /*1: Enable the Animations */
JohnnyK 0:10c4b83c458d 134 #define LV_USE_ANIMATION 1
JohnnyK 0:10c4b83c458d 135 #if LV_USE_ANIMATION
JohnnyK 0:10c4b83c458d 136
JohnnyK 0:10c4b83c458d 137 /*Declare the type of the user data of animations (can be e.g. `void *`, `int`, `struct`)*/
JohnnyK 0:10c4b83c458d 138 typedef void * lv_anim_user_data_t;
JohnnyK 0:10c4b83c458d 139
JohnnyK 0:10c4b83c458d 140 #endif
JohnnyK 0:10c4b83c458d 141
JohnnyK 0:10c4b83c458d 142 /* 1: Enable shadow drawing*/
JohnnyK 0:10c4b83c458d 143 #define LV_USE_SHADOW 1
JohnnyK 0:10c4b83c458d 144
JohnnyK 0:10c4b83c458d 145 /* 1: Enable object groups (for keyboard/encoder navigation) */
JohnnyK 0:10c4b83c458d 146 #define LV_USE_GROUP 1
JohnnyK 0:10c4b83c458d 147 #if LV_USE_GROUP
JohnnyK 0:10c4b83c458d 148 typedef void * lv_group_user_data_t;
JohnnyK 0:10c4b83c458d 149 #endif /*LV_USE_GROUP*/
JohnnyK 0:10c4b83c458d 150
JohnnyK 0:10c4b83c458d 151 /* 1: Enable GPU interface*/
JohnnyK 0:10c4b83c458d 152 #define LV_USE_GPU 1
JohnnyK 0:10c4b83c458d 153
JohnnyK 0:10c4b83c458d 154 /* 1: Enable file system (might be required for images */
JohnnyK 0:10c4b83c458d 155 #define LV_USE_FILESYSTEM 1
JohnnyK 0:10c4b83c458d 156 #if LV_USE_FILESYSTEM
JohnnyK 0:10c4b83c458d 157 /*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/
JohnnyK 0:10c4b83c458d 158 typedef void * lv_fs_drv_user_data_t;
JohnnyK 0:10c4b83c458d 159 #endif
JohnnyK 0:10c4b83c458d 160
JohnnyK 0:10c4b83c458d 161 /*1: Add a `user_data` to drivers and objects*/
JohnnyK 0:10c4b83c458d 162 #define LV_USE_USER_DATA 0
JohnnyK 0:10c4b83c458d 163
JohnnyK 0:10c4b83c458d 164 /*========================
JohnnyK 0:10c4b83c458d 165 * Image decoder and cache
JohnnyK 0:10c4b83c458d 166 *========================*/
JohnnyK 0:10c4b83c458d 167
JohnnyK 0:10c4b83c458d 168 /* 1: Enable indexed (palette) images */
JohnnyK 0:10c4b83c458d 169 #define LV_IMG_CF_INDEXED 1
JohnnyK 0:10c4b83c458d 170
JohnnyK 0:10c4b83c458d 171 /* 1: Enable alpha indexed images */
JohnnyK 0:10c4b83c458d 172 #define LV_IMG_CF_ALPHA 1
JohnnyK 0:10c4b83c458d 173
JohnnyK 0:10c4b83c458d 174 /* Default image cache size. Image caching keeps the images opened.
JohnnyK 0:10c4b83c458d 175 * If only the built-in image formats are used there is no real advantage of caching.
JohnnyK 0:10c4b83c458d 176 * (I.e. no new image decoder is added)
JohnnyK 0:10c4b83c458d 177 * With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
JohnnyK 0:10c4b83c458d 178 * However the opened images might consume additional RAM.
JohnnyK 0:10c4b83c458d 179 * LV_IMG_CACHE_DEF_SIZE must be >= 1 */
JohnnyK 0:10c4b83c458d 180 #define LV_IMG_CACHE_DEF_SIZE 1
JohnnyK 0:10c4b83c458d 181
JohnnyK 0:10c4b83c458d 182 /*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/
JohnnyK 0:10c4b83c458d 183 typedef void * lv_img_decoder_user_data_t;
JohnnyK 0:10c4b83c458d 184
JohnnyK 0:10c4b83c458d 185 /*=====================
JohnnyK 0:10c4b83c458d 186 * Compiler settings
JohnnyK 0:10c4b83c458d 187 *====================*/
JohnnyK 0:10c4b83c458d 188 /* Define a custom attribute to `lv_tick_inc` function */
JohnnyK 0:10c4b83c458d 189 #define LV_ATTRIBUTE_TICK_INC
JohnnyK 0:10c4b83c458d 190
JohnnyK 0:10c4b83c458d 191 /* Define a custom attribute to `lv_task_handler` function */
JohnnyK 0:10c4b83c458d 192 #define LV_ATTRIBUTE_TASK_HANDLER
JohnnyK 0:10c4b83c458d 193
JohnnyK 0:10c4b83c458d 194 /* With size optimization (-Os) the compiler might not align data to
JohnnyK 0:10c4b83c458d 195 * 4 or 8 byte boundary. This alignment will be explicitly applied where needed.
JohnnyK 0:10c4b83c458d 196 * E.g. __attribute__((aligned(4))) */
JohnnyK 0:10c4b83c458d 197 #define LV_ATTRIBUTE_MEM_ALIGN
JohnnyK 0:10c4b83c458d 198
JohnnyK 0:10c4b83c458d 199 /* Attribute to mark large constant arrays for example
JohnnyK 0:10c4b83c458d 200 * font's bitmaps */
JohnnyK 0:10c4b83c458d 201 #define LV_ATTRIBUTE_LARGE_CONST
JohnnyK 0:10c4b83c458d 202
JohnnyK 0:10c4b83c458d 203 /*===================
JohnnyK 0:10c4b83c458d 204 * HAL settings
JohnnyK 0:10c4b83c458d 205 *==================*/
JohnnyK 0:10c4b83c458d 206
JohnnyK 0:10c4b83c458d 207 /* 1: use a custom tick source.
JohnnyK 0:10c4b83c458d 208 * It removes the need to manually update the tick with `lv_tick_inc`) */
JohnnyK 0:10c4b83c458d 209 #define LV_TICK_CUSTOM 0
JohnnyK 0:10c4b83c458d 210 #if LV_TICK_CUSTOM == 1
JohnnyK 0:10c4b83c458d 211 #define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/
JohnnyK 0:10c4b83c458d 212 #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/
JohnnyK 0:10c4b83c458d 213 #endif /*LV_TICK_CUSTOM*/
JohnnyK 0:10c4b83c458d 214
JohnnyK 0:10c4b83c458d 215 typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/
JohnnyK 0:10c4b83c458d 216 typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/
JohnnyK 0:10c4b83c458d 217
JohnnyK 0:10c4b83c458d 218 /*================
JohnnyK 0:10c4b83c458d 219 * Log settings
JohnnyK 0:10c4b83c458d 220 *===============*/
JohnnyK 0:10c4b83c458d 221
JohnnyK 0:10c4b83c458d 222 /*1: Enable the log module*/
JohnnyK 0:10c4b83c458d 223 #define LV_USE_LOG 0
JohnnyK 0:10c4b83c458d 224 #if LV_USE_LOG
JohnnyK 0:10c4b83c458d 225 /* How important log should be added:
JohnnyK 0:10c4b83c458d 226 * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
JohnnyK 0:10c4b83c458d 227 * LV_LOG_LEVEL_INFO Log important events
JohnnyK 0:10c4b83c458d 228 * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
JohnnyK 0:10c4b83c458d 229 * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
JohnnyK 0:10c4b83c458d 230 * LV_LOG_LEVEL_NONE Do not log anything
JohnnyK 0:10c4b83c458d 231 */
JohnnyK 0:10c4b83c458d 232 # define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
JohnnyK 0:10c4b83c458d 233
JohnnyK 0:10c4b83c458d 234 /* 1: Print the log with 'printf';
JohnnyK 0:10c4b83c458d 235 * 0: user need to register a callback with `lv_log_register_print`*/
JohnnyK 0:10c4b83c458d 236 # define LV_LOG_PRINTF 0
JohnnyK 0:10c4b83c458d 237 #endif /*LV_USE_LOG*/
JohnnyK 0:10c4b83c458d 238
JohnnyK 0:10c4b83c458d 239 /*================
JohnnyK 0:10c4b83c458d 240 * THEME USAGE
JohnnyK 0:10c4b83c458d 241 *================*/
JohnnyK 0:10c4b83c458d 242 #define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/
JohnnyK 0:10c4b83c458d 243
JohnnyK 0:10c4b83c458d 244 #define LV_USE_THEME_TEMPL 0 /*Just for test*/
JohnnyK 0:10c4b83c458d 245 #define LV_USE_THEME_DEFAULT 0 /*Built mainly from the built-in styles. Consumes very few RAM*/
JohnnyK 0:10c4b83c458d 246 #define LV_USE_THEME_ALIEN 0 /*Dark futuristic theme*/
JohnnyK 0:10c4b83c458d 247 #define LV_USE_THEME_NIGHT 0 /*Dark elegant theme*/
JohnnyK 0:10c4b83c458d 248 #define LV_USE_THEME_MONO 0 /*Mono color theme for monochrome displays*/
JohnnyK 0:10c4b83c458d 249 #define LV_USE_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/
JohnnyK 0:10c4b83c458d 250 #define LV_USE_THEME_ZEN 0 /*Peaceful, mainly light theme */
JohnnyK 0:10c4b83c458d 251 #define LV_USE_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/
JohnnyK 0:10c4b83c458d 252
JohnnyK 0:10c4b83c458d 253 /*==================
JohnnyK 0:10c4b83c458d 254 * FONT USAGE
JohnnyK 0:10c4b83c458d 255 *===================*/
JohnnyK 0:10c4b83c458d 256
JohnnyK 0:10c4b83c458d 257 /* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
JohnnyK 0:10c4b83c458d 258 * The symbols are available via `LV_SYMBOL_...` defines
JohnnyK 0:10c4b83c458d 259 * More info about fonts: https://docs.littlevgl.com/#Fonts
JohnnyK 0:10c4b83c458d 260 * To create a new font go to: https://littlevgl.com/ttf-font-to-c-array
JohnnyK 0:10c4b83c458d 261 */
JohnnyK 0:10c4b83c458d 262
JohnnyK 0:10c4b83c458d 263 /* Robot fonts with bpp = 4
JohnnyK 0:10c4b83c458d 264 * https://fonts.google.com/specimen/Roboto */
JohnnyK 0:10c4b83c458d 265 #define LV_FONT_ROBOTO_12 0
JohnnyK 0:10c4b83c458d 266 #define LV_FONT_ROBOTO_16 1
JohnnyK 0:10c4b83c458d 267 #define LV_FONT_ROBOTO_22 1
JohnnyK 0:10c4b83c458d 268 #define LV_FONT_ROBOTO_28 1
JohnnyK 0:10c4b83c458d 269
JohnnyK 0:10c4b83c458d 270 /*Pixel perfect monospace font
JohnnyK 0:10c4b83c458d 271 * http://pelulamu.net/unscii/ */
JohnnyK 0:10c4b83c458d 272 #define LV_FONT_UNSCII_8 0
JohnnyK 0:10c4b83c458d 273
JohnnyK 0:10c4b83c458d 274 /* Optionally declare your custom fonts here.
JohnnyK 0:10c4b83c458d 275 * You can use these fonts as default font too
JohnnyK 0:10c4b83c458d 276 * and they will be available globally. E.g.
JohnnyK 0:10c4b83c458d 277 * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \
JohnnyK 0:10c4b83c458d 278 * LV_FONT_DECLARE(my_font_2)
JohnnyK 0:10c4b83c458d 279 */
JohnnyK 0:10c4b83c458d 280 #define LV_FONT_CUSTOM_DECLARE
JohnnyK 0:10c4b83c458d 281
JohnnyK 0:10c4b83c458d 282 /*Always set a default font from the built-in fonts*/
JohnnyK 0:10c4b83c458d 283 #define LV_FONT_DEFAULT &lv_font_roboto_16
JohnnyK 0:10c4b83c458d 284
JohnnyK 0:10c4b83c458d 285 /* Enable it if you have fonts with a lot of characters.
JohnnyK 0:10c4b83c458d 286 * The limit depends on the font size, font face and bpp
JohnnyK 0:10c4b83c458d 287 * but with > 10,000 characters if you see issues probably you need to enable it.*/
JohnnyK 0:10c4b83c458d 288 #define LV_FONT_FMT_TXT_LARGE 0
JohnnyK 0:10c4b83c458d 289
JohnnyK 0:10c4b83c458d 290 /*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/
JohnnyK 0:10c4b83c458d 291 typedef void * lv_font_user_data_t;
JohnnyK 0:10c4b83c458d 292
JohnnyK 0:10c4b83c458d 293 /*=================
JohnnyK 0:10c4b83c458d 294 * Text settings
JohnnyK 0:10c4b83c458d 295 *=================*/
JohnnyK 0:10c4b83c458d 296
JohnnyK 0:10c4b83c458d 297 /* Select a character encoding for strings.
JohnnyK 0:10c4b83c458d 298 * Your IDE or editor should have the same character encoding
JohnnyK 0:10c4b83c458d 299 * - LV_TXT_ENC_UTF8
JohnnyK 0:10c4b83c458d 300 * - LV_TXT_ENC_ASCII
JohnnyK 0:10c4b83c458d 301 * */
JohnnyK 0:10c4b83c458d 302 #define LV_TXT_ENC LV_TXT_ENC_UTF8
JohnnyK 0:10c4b83c458d 303
JohnnyK 0:10c4b83c458d 304 /*Can break (wrap) texts on these chars*/
JohnnyK 0:10c4b83c458d 305 #define LV_TXT_BREAK_CHARS " ,.;:-_"
JohnnyK 0:10c4b83c458d 306
JohnnyK 0:10c4b83c458d 307 /*===================
JohnnyK 0:10c4b83c458d 308 * LV_OBJ SETTINGS
JohnnyK 0:10c4b83c458d 309 *==================*/
JohnnyK 0:10c4b83c458d 310
JohnnyK 0:10c4b83c458d 311 /*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/
JohnnyK 0:10c4b83c458d 312 typedef void * lv_obj_user_data_t;
JohnnyK 0:10c4b83c458d 313
JohnnyK 0:10c4b83c458d 314 /*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/
JohnnyK 0:10c4b83c458d 315 #define LV_USE_OBJ_REALIGN 1
JohnnyK 0:10c4b83c458d 316
JohnnyK 0:10c4b83c458d 317 /* Enable to make the object clickable on a larger area.
JohnnyK 0:10c4b83c458d 318 * LV_EXT_CLICK_AREA_OFF or 0: Disable this feature
JohnnyK 0:10c4b83c458d 319 * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px)
JohnnyK 0:10c4b83c458d 320 * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px)
JohnnyK 0:10c4b83c458d 321 */
JohnnyK 0:10c4b83c458d 322 #define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF
JohnnyK 0:10c4b83c458d 323
JohnnyK 0:10c4b83c458d 324 /*==================
JohnnyK 0:10c4b83c458d 325 * LV OBJ X USAGE
JohnnyK 0:10c4b83c458d 326 *================*/
JohnnyK 0:10c4b83c458d 327 /*
JohnnyK 0:10c4b83c458d 328 * Documentation of the object types: https://docs.littlevgl.com/#Object-types
JohnnyK 0:10c4b83c458d 329 */
JohnnyK 0:10c4b83c458d 330
JohnnyK 0:10c4b83c458d 331 /*Arc (dependencies: -)*/
JohnnyK 0:10c4b83c458d 332 #define LV_USE_ARC 1
JohnnyK 0:10c4b83c458d 333
JohnnyK 0:10c4b83c458d 334 /*Bar (dependencies: -)*/
JohnnyK 0:10c4b83c458d 335 #define LV_USE_BAR 1
JohnnyK 0:10c4b83c458d 336
JohnnyK 0:10c4b83c458d 337 /*Button (dependencies: lv_cont*/
JohnnyK 0:10c4b83c458d 338 #define LV_USE_BTN 1
JohnnyK 0:10c4b83c458d 339 #if LV_USE_BTN != 0
JohnnyK 0:10c4b83c458d 340 /*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/
JohnnyK 0:10c4b83c458d 341 # define LV_BTN_INK_EFFECT 0
JohnnyK 0:10c4b83c458d 342 #endif
JohnnyK 0:10c4b83c458d 343
JohnnyK 0:10c4b83c458d 344 /*Button matrix (dependencies: -)*/
JohnnyK 0:10c4b83c458d 345 #define LV_USE_BTNM 1
JohnnyK 0:10c4b83c458d 346
JohnnyK 0:10c4b83c458d 347 /*Calendar (dependencies: -)*/
JohnnyK 0:10c4b83c458d 348 #define LV_USE_CALENDAR 1
JohnnyK 0:10c4b83c458d 349
JohnnyK 0:10c4b83c458d 350 /*Canvas (dependencies: lv_img)*/
JohnnyK 0:10c4b83c458d 351 #define LV_USE_CANVAS 1
JohnnyK 0:10c4b83c458d 352
JohnnyK 0:10c4b83c458d 353 /*Check box (dependencies: lv_btn, lv_label)*/
JohnnyK 0:10c4b83c458d 354 #define LV_USE_CB 1
JohnnyK 0:10c4b83c458d 355
JohnnyK 0:10c4b83c458d 356 /*Chart (dependencies: -)*/
JohnnyK 0:10c4b83c458d 357 #define LV_USE_CHART 1
JohnnyK 0:10c4b83c458d 358 #if LV_USE_CHART
JohnnyK 0:10c4b83c458d 359 # define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 20
JohnnyK 0:10c4b83c458d 360 #endif
JohnnyK 0:10c4b83c458d 361
JohnnyK 0:10c4b83c458d 362 /*Container (dependencies: -*/
JohnnyK 0:10c4b83c458d 363 #define LV_USE_CONT 1
JohnnyK 0:10c4b83c458d 364
JohnnyK 0:10c4b83c458d 365 /*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
JohnnyK 0:10c4b83c458d 366 #define LV_USE_DDLIST 1
JohnnyK 0:10c4b83c458d 367 #if LV_USE_DDLIST != 0
JohnnyK 0:10c4b83c458d 368 /*Open and close default animation time [ms] (0: no animation)*/
JohnnyK 0:10c4b83c458d 369 # define LV_DDLIST_DEF_ANIM_TIME 200
JohnnyK 0:10c4b83c458d 370 #endif
JohnnyK 0:10c4b83c458d 371
JohnnyK 0:10c4b83c458d 372 /*Gauge (dependencies:lv_bar, lv_lmeter)*/
JohnnyK 0:10c4b83c458d 373 #define LV_USE_GAUGE 1
JohnnyK 0:10c4b83c458d 374
JohnnyK 0:10c4b83c458d 375 /*Image (dependencies: lv_label*/
JohnnyK 0:10c4b83c458d 376 #define LV_USE_IMG 1
JohnnyK 0:10c4b83c458d 377
JohnnyK 0:10c4b83c458d 378 /*Image Button (dependencies: lv_btn*/
JohnnyK 0:10c4b83c458d 379 #define LV_USE_IMGBTN 1
JohnnyK 0:10c4b83c458d 380 #if LV_USE_IMGBTN
JohnnyK 0:10c4b83c458d 381 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/
JohnnyK 0:10c4b83c458d 382 # define LV_IMGBTN_TILED 0
JohnnyK 0:10c4b83c458d 383 #endif
JohnnyK 0:10c4b83c458d 384
JohnnyK 0:10c4b83c458d 385 /*Keyboard (dependencies: lv_btnm)*/
JohnnyK 0:10c4b83c458d 386 #define LV_USE_KB 1
JohnnyK 0:10c4b83c458d 387
JohnnyK 0:10c4b83c458d 388 /*Label (dependencies: -*/
JohnnyK 0:10c4b83c458d 389 #define LV_USE_LABEL 1
JohnnyK 0:10c4b83c458d 390 #if LV_USE_LABEL != 0
JohnnyK 0:10c4b83c458d 391 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/
JohnnyK 0:10c4b83c458d 392 # define LV_LABEL_DEF_SCROLL_SPEED 25
JohnnyK 0:10c4b83c458d 393
JohnnyK 0:10c4b83c458d 394 /* Waiting period at beginning/end of animation cycle */
JohnnyK 0:10c4b83c458d 395 # define LV_LABEL_WAIT_CHAR_COUNT 3
JohnnyK 0:10c4b83c458d 396
JohnnyK 0:10c4b83c458d 397 /*Enable selecting text of the label */
JohnnyK 0:10c4b83c458d 398 # define LV_LABEL_TEXT_SEL 0
JohnnyK 0:10c4b83c458d 399
JohnnyK 0:10c4b83c458d 400 /*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/
JohnnyK 0:10c4b83c458d 401 # define LV_LABEL_LONG_TXT_HINT 0
JohnnyK 0:10c4b83c458d 402 #endif
JohnnyK 0:10c4b83c458d 403
JohnnyK 0:10c4b83c458d 404 /*LED (dependencies: -)*/
JohnnyK 0:10c4b83c458d 405 #define LV_USE_LED 1
JohnnyK 0:10c4b83c458d 406
JohnnyK 0:10c4b83c458d 407 /*Line (dependencies: -*/
JohnnyK 0:10c4b83c458d 408 #define LV_USE_LINE 1
JohnnyK 0:10c4b83c458d 409
JohnnyK 0:10c4b83c458d 410 /*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/
JohnnyK 0:10c4b83c458d 411 #define LV_USE_LIST 1
JohnnyK 0:10c4b83c458d 412 #if LV_USE_LIST != 0
JohnnyK 0:10c4b83c458d 413 /*Default animation time of focusing to a list element [ms] (0: no animation) */
JohnnyK 0:10c4b83c458d 414 # define LV_LIST_DEF_ANIM_TIME 100
JohnnyK 0:10c4b83c458d 415 #endif
JohnnyK 0:10c4b83c458d 416
JohnnyK 0:10c4b83c458d 417 /*Line meter (dependencies: *;)*/
JohnnyK 0:10c4b83c458d 418 #define LV_USE_LMETER 1
JohnnyK 0:10c4b83c458d 419
JohnnyK 0:10c4b83c458d 420 /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
JohnnyK 0:10c4b83c458d 421 #define LV_USE_MBOX 1
JohnnyK 0:10c4b83c458d 422
JohnnyK 0:10c4b83c458d 423 /*Page (dependencies: lv_cont)*/
JohnnyK 0:10c4b83c458d 424 #define LV_USE_PAGE 1
JohnnyK 0:10c4b83c458d 425 #if LV_USE_PAGE != 0
JohnnyK 0:10c4b83c458d 426 /*Focus default animation time [ms] (0: no animation)*/
JohnnyK 0:10c4b83c458d 427 # define LV_PAGE_DEF_ANIM_TIME 400
JohnnyK 0:10c4b83c458d 428 #endif
JohnnyK 0:10c4b83c458d 429
JohnnyK 0:10c4b83c458d 430 /*Preload (dependencies: lv_arc, lv_anim)*/
JohnnyK 0:10c4b83c458d 431 #define LV_USE_PRELOAD 1
JohnnyK 0:10c4b83c458d 432 #if LV_USE_PRELOAD != 0
JohnnyK 0:10c4b83c458d 433 # define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/
JohnnyK 0:10c4b83c458d 434 # define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/
JohnnyK 0:10c4b83c458d 435 # define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC
JohnnyK 0:10c4b83c458d 436 #endif
JohnnyK 0:10c4b83c458d 437
JohnnyK 0:10c4b83c458d 438 /*Roller (dependencies: lv_ddlist)*/
JohnnyK 0:10c4b83c458d 439 #define LV_USE_ROLLER 1
JohnnyK 0:10c4b83c458d 440 #if LV_USE_ROLLER != 0
JohnnyK 0:10c4b83c458d 441 /*Focus animation time [ms] (0: no animation)*/
JohnnyK 0:10c4b83c458d 442 # define LV_ROLLER_DEF_ANIM_TIME 200
JohnnyK 0:10c4b83c458d 443
JohnnyK 0:10c4b83c458d 444 /*Number of extra "pages" when the roller is infinite*/
JohnnyK 0:10c4b83c458d 445 # define LV_ROLLER_INF_PAGES 7
JohnnyK 0:10c4b83c458d 446 #endif
JohnnyK 0:10c4b83c458d 447
JohnnyK 0:10c4b83c458d 448 /*Slider (dependencies: lv_bar)*/
JohnnyK 0:10c4b83c458d 449 #define LV_USE_SLIDER 1
JohnnyK 0:10c4b83c458d 450
JohnnyK 0:10c4b83c458d 451 /*Spinbox (dependencies: lv_ta)*/
JohnnyK 0:10c4b83c458d 452 #define LV_USE_SPINBOX 1
JohnnyK 0:10c4b83c458d 453
JohnnyK 0:10c4b83c458d 454 /*Switch (dependencies: lv_slider)*/
JohnnyK 0:10c4b83c458d 455 #define LV_USE_SW 1
JohnnyK 0:10c4b83c458d 456
JohnnyK 0:10c4b83c458d 457 /*Text area (dependencies: lv_label, lv_page)*/
JohnnyK 0:10c4b83c458d 458 #define LV_USE_TA 1
JohnnyK 0:10c4b83c458d 459 #if LV_USE_TA != 0
JohnnyK 0:10c4b83c458d 460 # define LV_TA_DEF_CURSOR_BLINK_TIME 400 /*ms*/
JohnnyK 0:10c4b83c458d 461 # define LV_TA_DEF_PWD_SHOW_TIME 1500 /*ms*/
JohnnyK 0:10c4b83c458d 462 #endif
JohnnyK 0:10c4b83c458d 463
JohnnyK 0:10c4b83c458d 464 /*Table (dependencies: lv_label)*/
JohnnyK 0:10c4b83c458d 465 #define LV_USE_TABLE 1
JohnnyK 0:10c4b83c458d 466 #if LV_USE_TABLE
JohnnyK 0:10c4b83c458d 467 # define LV_TABLE_COL_MAX 12
JohnnyK 0:10c4b83c458d 468 #endif
JohnnyK 0:10c4b83c458d 469
JohnnyK 0:10c4b83c458d 470 /*Tab (dependencies: lv_page, lv_btnm)*/
JohnnyK 0:10c4b83c458d 471 #define LV_USE_TABVIEW 1
JohnnyK 0:10c4b83c458d 472 # if LV_USE_TABVIEW != 0
JohnnyK 0:10c4b83c458d 473 /*Time of slide animation [ms] (0: no animation)*/
JohnnyK 0:10c4b83c458d 474 # define LV_TABVIEW_DEF_ANIM_TIME 300
JohnnyK 0:10c4b83c458d 475 #endif
JohnnyK 0:10c4b83c458d 476
JohnnyK 0:10c4b83c458d 477 /*Tileview (dependencies: lv_page) */
JohnnyK 0:10c4b83c458d 478 #define LV_USE_TILEVIEW 1
JohnnyK 0:10c4b83c458d 479 #if LV_USE_TILEVIEW
JohnnyK 0:10c4b83c458d 480 /*Time of slide animation [ms] (0: no animation)*/
JohnnyK 0:10c4b83c458d 481 # define LV_TILEVIEW_DEF_ANIM_TIME 300
JohnnyK 0:10c4b83c458d 482 #endif
JohnnyK 0:10c4b83c458d 483
JohnnyK 0:10c4b83c458d 484 /*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
JohnnyK 0:10c4b83c458d 485 #define LV_USE_WIN 1
JohnnyK 0:10c4b83c458d 486
JohnnyK 0:10c4b83c458d 487 /*==================
JohnnyK 0:10c4b83c458d 488 * Non-user section
JohnnyK 0:10c4b83c458d 489 *==================*/
JohnnyK 0:10c4b83c458d 490
JohnnyK 0:10c4b83c458d 491 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/
JohnnyK 0:10c4b83c458d 492 # define _CRT_SECURE_NO_WARNINGS
JohnnyK 0:10c4b83c458d 493 #endif
JohnnyK 0:10c4b83c458d 494
JohnnyK 0:10c4b83c458d 495 /*--END OF LV_CONF_H--*/
JohnnyK 0:10c4b83c458d 496
JohnnyK 0:10c4b83c458d 497 /*Be sure every define has a default value*/
JohnnyK 0:10c4b83c458d 498 #include "lvgl/src/lv_conf_checker.h"
JohnnyK 0:10c4b83c458d 499
JohnnyK 0:10c4b83c458d 500 #endif /*LV_CONF_H*/
JohnnyK 0:10c4b83c458d 501
JohnnyK 0:10c4b83c458d 502 #endif /*End of "Content enable"*/