Guest User

Untitled

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