From 54084511bc7fa2ceb1e54d0133942aebc4ea711b Mon Sep 17 00:00:00 2001 From: Nia Espera Date: Tue, 9 May 2023 16:16:29 +0200 Subject: [PATCH] update basics --- examples/include/lv_conf.h | 486 ++++++++++++++++++--------------- examples/include/lv_drv_conf.h | 9 +- lvgl-sys/vendor/lv_drivers | 2 +- lvgl-sys/vendor/lvgl | 2 +- 4 files changed, 281 insertions(+), 218 deletions(-) diff --git a/examples/include/lv_conf.h b/examples/include/lv_conf.h index ec245c44..291d74ec 100644 --- a/examples/include/lv_conf.h +++ b/examples/include/lv_conf.h @@ -1,6 +1,6 @@ /** * @file lv_conf.h - * Configuration file for v8.3.5 + * Configuration file for v9.0.0-dev */ /* @@ -23,34 +23,24 @@ COLOR SETTINGS *====================*/ -/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 32 (ARGB8888)*/ +/*Color depth: 1 (1 byte per pixel), 8 (RGB332), 16 (RGB565), 24 (RGB888), 32 (ARGB8888)*/ #define LV_COLOR_DEPTH 16 -/*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/ -#define LV_COLOR_16_SWAP 0 - -/*Enable features to draw on transparent background. - *It's required if opa, and transform_* style properties are used. - *Can be also used if the UI is above another layer, e.g. an OSD menu or video player.*/ -#define LV_COLOR_SCREEN_TRANSP 0 - -/* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently. - * 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */ -#define LV_COLOR_MIX_ROUND_OFS 0 - -/*Images pixels with this color will not be drawn if they are chroma keyed)*/ -#define LV_COLOR_CHROMA_KEY lv_color_hex(0x00ff00) /*pure green*/ +#define LV_COLOR_CHROMA_KEY lv_color_hex(0x00ff00) /*========================= - MEMORY SETTINGS + STDLIB WRAPPER SETTINGS *=========================*/ -/*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/ -#define LV_MEM_CUSTOM 0 -#if LV_MEM_CUSTOM == 0 - /*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/ +/*Enable and configure the built-in memory manager*/ +#define LV_USE_BUILTIN_MALLOC 1 +#if LV_USE_BUILTIN_MALLOC + /*Size of the memory available for `lv_malloc()` in bytes (>= 2kB)*/ #define LV_MEM_SIZE (1024U * 1024U) /*[bytes]*/ + /*Size of the memory expand for `lv_malloc()` in bytes*/ + #define LV_MEM_POOL_EXPAND_SIZE 0 + /*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/ #define LV_MEM_ADR 0 /*0: unused*/ /*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/ @@ -58,37 +48,49 @@ #undef LV_MEM_POOL_INCLUDE #undef LV_MEM_POOL_ALLOC #endif +#endif /*LV_USE_BUILTIN_MALLOC*/ -#else /*LV_MEM_CUSTOM*/ - #define LV_MEM_CUSTOM_INCLUDE /*Header for the dynamic memory function*/ - #define LV_MEM_CUSTOM_ALLOC malloc - #define LV_MEM_CUSTOM_FREE free - #define LV_MEM_CUSTOM_REALLOC realloc -#endif /*LV_MEM_CUSTOM*/ - -/*Number of the intermediate memory buffer used during rendering and other internal processing mechanisms. - *You will see an error log message if there wasn't enough buffers. */ -#define LV_MEM_BUF_MAX_NUM 16 +/*Enable lv_memcpy_builtin, lv_memset_builtin, lv_strlen_builtin, lv_strncpy_builtin, lv_strcpy_builtin*/ +#define LV_USE_BUILTIN_MEMCPY 1 -/*Use the standard `memcpy` and `memset` instead of LVGL's own functions. (Might or might not be faster).*/ -#define LV_MEMCPY_MEMSET_STD 0 +/*Enable and configure the built-in (v)snprintf */ +#define LV_USE_BUILTIN_SNPRINTF 1 +#if LV_USE_BUILTIN_SNPRINTF + #define LV_SPRINTF_USE_FLOAT 0 +#endif /*LV_USE_BUILTIN_SNPRINTF*/ + +#define LV_STDLIB_INCLUDE +#define LV_STDIO_INCLUDE +#define LV_STRING_INCLUDE +#define LV_MALLOC lv_malloc_builtin +#define LV_REALLOC lv_realloc_builtin +#define LV_FREE lv_free_builtin +#define LV_MEMSET lv_memset_builtin +#define LV_MEMCPY lv_memcpy_builtin +#define LV_SNPRINTF lv_snprintf_builtin +#define LV_VSNPRINTF lv_vsnprintf_builtin +#define LV_STRLEN lv_strlen_builtin +#define LV_STRNCPY lv_strncpy_builtin +#define LV_STRCPY lv_strcpy_builtin + +#define LV_COLOR_EXTERN_INCLUDE +#define LV_COLOR_MIX lv_color_mix +#define LV_COLOR_PREMULT lv_color_premult +#define LV_COLOR_MIX_PREMULT lv_color_mix_premult /*==================== HAL SETTINGS *====================*/ -/*Default display refresh period. LVG will redraw changed areas with this period time*/ -#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/ - -/*Input device read period in milliseconds*/ -#define LV_INDEV_DEF_READ_PERIOD 30 /*[ms]*/ +/*Default display refresh, input device read and animation step period.*/ +#define LV_DEF_REFR_PERIOD 33 /*[ms]*/ /*Use a custom tick source that tells the elapsed time in milliseconds. *It removes the need to manually update the tick with `lv_tick_inc()`)*/ #define LV_TICK_CUSTOM 0 #if LV_TICK_CUSTOM - #define LV_TICK_CUSTOM_INCLUDE /*Header for the system time function*/ - #define LV_TICK_CUSTOM_SYS_TIME_EXPR (rs_lv_timer()) /*Expression evaluating to current system time in ms*/ + #define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/ + #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/ /*If using lvgl as ESP32 component*/ // #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h" // #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL)) @@ -98,83 +100,82 @@ *(Not so important, you can adjust it to modify default sizes and spaces)*/ #define LV_DPI_DEF 130 /*[px/inch]*/ -/*======================= - * FEATURE CONFIGURATION - *=======================*/ +/*======================== + * DRAW CONFIGURATION + *========================*/ -/*------------- - * Drawing - *-----------*/ +/*Enable the built in mask engine. + *Required to draw shadow, rounded corners, circles, arc, skew lines, or any other masks*/ +#define LV_USE_DRAW_MASKS 1 + +#define LV_USE_DRAW_SW 1 +#if LV_USE_DRAW_SW + + /*Enable complex draw engine. + *Required to draw shadow, gradient, rounded corners, circles, arc, skew lines, image transformations or any masks*/ + #define LV_DRAW_SW_COMPLEX 1 + + /* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode + * it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks. + * "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers + * and can't be drawn in chunks. */ -/*Enable complex draw engine. - *Required to draw shadow, gradient, rounded corners, circles, arc, skew lines, image transformations or any masks*/ -#define LV_DRAW_COMPLEX 1 -#if LV_DRAW_COMPLEX != 0 + /*The target buffer size for simple layer chunks.*/ + #define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/ + + /*Used if `LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE` couldn't be allocated.*/ + #define LV_DRAW_SW_LAYER_SIMPLE_FALLBACK_BUF_SIZE (3 * 1024) /*[bytes]*/ /*Allow buffering some shadow calculation. - *LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius` - *Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/ - #define LV_SHADOW_CACHE_SIZE 0 + *LV_DRAW_SW_SHADOW_CACHE_SIZE is the max. shadow size to buffer, where shadow size is `shadow_width + radius` + *Caching has LV_DRAW_SW_SHADOW_CACHE_SIZE^2 RAM cost*/ + #define LV_DRAW_SW_SHADOW_CACHE_SIZE 0 /* Set number of maximally cached circle data. * The circumference of 1/4 circle are saved for anti-aliasing * radius * 4 bytes are used per circle (the most often used radiuses are saved) * 0: to disable caching */ - #define LV_CIRCLE_CACHE_SIZE 4 -#endif /*LV_DRAW_COMPLEX*/ - -/** - * "Simple layers" are used when a widget has `style_opa < 255` to buffer the widget into a layer - * and blend it as an image with the given opacity. - * Note that `bg_opa`, `text_opa` etc don't require buffering into layer) - * The widget can be buffered in smaller chunks to avoid using large buffers. - * - * - LV_LAYER_SIMPLE_BUF_SIZE: [bytes] the optimal target buffer size. LVGL will try to allocate it - * - LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE: [bytes] used if `LV_LAYER_SIMPLE_BUF_SIZE` couldn't be allocated. - * - * Both buffer sizes are in bytes. - * "Transformed layers" (where transform_angle/zoom properties are used) use larger buffers - * and can't be drawn in chunks. So these settings affects only widgets with opacity. - */ -#define LV_LAYER_SIMPLE_BUF_SIZE (24 * 1024) -#define LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE (3 * 1024) - -/*Default image cache size. Image caching keeps the images opened. - *If only the built-in image formats are used there is no real advantage of caching. (I.e. if no new image decoder is added) - *With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images. - *However the opened images might consume additional RAM. - *0: to disable caching*/ -#define LV_IMG_CACHE_DEF_SIZE 0 - -/*Number of stops allowed per gradient. Increase this to allow more stops. - *This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/ -#define LV_GRADIENT_MAX_STOPS 2 + #define LV_DRAW_SW_CIRCLE_CACHE_SIZE 4 + + /*Default gradient buffer size. + *When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again. + *LV_DRAW_SW_GRADIENT_CACHE_DEF_SIZE sets the size of this cache in bytes. + *If the cache is too small the map will be allocated only while it's required for the drawing. + *0 mean no caching.*/ + #define LV_DRAW_SW_GRADIENT_CACHE_DEF_SIZE 0 + + /*Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display) + *LV_DRAW_SW_GRADIENT_DITHER implies allocating one or two more lines of the object's rendering surface + *The increase in memory consumption is (32 bits * object width) plus 24 bits * object width if using error diffusion */ + #define LV_DRAW_SW_GRADIENT_DITHER 0 + #if LV_DRAW_SW_GRADIENT_DITHER + /*Add support for error diffusion dithering. + *Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing. + *The increase in memory consumption is (24 bits * object's width)*/ + #define LV_DRAW_SW_GRADIENT_DITHER_ERROR_DIFFUSION 0 + #endif -/*Default gradient buffer size. - *When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again. - *LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes. - *If the cache is too small the map will be allocated only while it's required for the drawing. - *0 mean no caching.*/ -#define LV_GRAD_CACHE_DEF_SIZE 0 - -/*Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display) - *LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface - *The increase in memory consumption is (32 bits * object width) plus 24 bits * object width if using error diffusion */ -#define LV_DITHER_GRADIENT 0 -#if LV_DITHER_GRADIENT - /*Add support for error diffusion dithering. - *Error diffusion dithering gets a much better visual result, but implies more CPU consumption and memory when drawing. - *The increase in memory consumption is (24 bits * object's width)*/ - #define LV_DITHER_ERROR_DIFFUSION 0 + /*Enable subpixel rendering*/ + #define LV_DRAW_SW_FONT_SUBPX 0 + #if LV_DRAW_SW_FONT_SUBPX + /*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/ + #define LV_DRAW_SW_FONT_SUBPX_BGR 0 /*0: RGB; 1:BGR order*/ + #endif #endif -/*Maximum buffer size to allocate for rotation. - *Only used if software rotation is enabled in the display driver.*/ -#define LV_DISP_ROT_MAX_BUF (10*1024) +/*Use SDL renderer API*/ +#define LV_USE_DRAW_SDL 0 +#if LV_USE_DRAW_SDL + #define LV_DRAW_SDL_INCLUDE_PATH + /*Texture cache size, 8MB by default*/ + #define LV_DRAW_SDL_LRU_SIZE (1024 * 1024 * 8) + /*Custom blend mode for mask drawing, disable if you need to link with older SDL2 lib*/ + #define LV_DRAW_SDL_CUSTOM_BLEND_MODE (SDL_VERSION_ATLEAST(2, 0, 6)) +#endif -/*------------- - * GPU - *-----------*/ +/*===================== + * GPU CONFIGURATION + *=====================*/ /*Use Arm's 2D acceleration library Arm-2D */ #define LV_USE_GPU_ARM2D 0 @@ -187,11 +188,13 @@ #define LV_GPU_DMA2D_CMSIS_INCLUDE #endif -/*Use SWM341's DMA2D GPU*/ -#define LV_USE_GPU_SWM341_DMA2D 0 -#if LV_USE_GPU_SWM341_DMA2D - #define LV_GPU_SWM341_DMA2D_INCLUDE "SWM341.h" -#endif +/*Use GD32 IPA GPU + * This adds support for Image Processing Accelerator on GD32F450 and GD32F470 series MCUs + * + * NOTE: IPA on GD32F450 has a bug where the fill operation overwrites data beyond the + * framebuffer. This driver works around it by saving and restoring affected memory, but + * this makes it not thread-safe. GD32F470 is not affected. */ +#define LV_USE_GPU_GD32_IPA 0 /*Use NXP's PXP GPU iMX RTxxx platforms*/ #define LV_USE_GPU_NXP_PXP 0 @@ -207,22 +210,22 @@ /*Use NXP's VG-Lite GPU iMX RTxxx platforms*/ #define LV_USE_GPU_NXP_VG_LITE 0 -/*Use SDL renderer API*/ -#define LV_USE_GPU_SDL 0 -#if LV_USE_GPU_SDL - #define LV_GPU_SDL_INCLUDE_PATH - /*Texture cache size, 8MB by default*/ - #define LV_GPU_SDL_LRU_SIZE (1024 * 1024 * 8) - /*Custom blend mode for mask drawing, disable if you need to link with older SDL2 lib*/ - #define LV_GPU_SDL_CUSTOM_BLEND_MODE (SDL_VERSION_ATLEAST(2, 0, 6)) +/*Use SWM341's DMA2D GPU*/ +#define LV_USE_GPU_SWM341_DMA2D 0 +#if LV_USE_GPU_SWM341_DMA2D + #define LV_GPU_SWM341_DMA2D_INCLUDE "SWM341.h" #endif +/*======================= + * FEATURE CONFIGURATION + *=======================*/ + /*------------- * Logging *-----------*/ /*Enable the log module*/ -#define LV_USE_LOG 1 +#define LV_USE_LOG 0 #if LV_USE_LOG /*How important log should be added: @@ -232,11 +235,15 @@ *LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail *LV_LOG_LEVEL_USER Only logs added by the user *LV_LOG_LEVEL_NONE Do not log anything*/ - #define LV_LOG_LEVEL LV_LOG_LEVEL_INFO + #define LV_LOG_LEVEL LV_LOG_LEVEL_WARN /*1: Print the log with 'printf'; *0: User need to register a callback with `lv_log_register_print_cb()`*/ - #define LV_LOG_PRINTF 1 + #define LV_LOG_PRINTF 0 + + /*1: Enable print timestamp; + *0: Disable print timestamp*/ + #define LV_LOG_USE_TIMESTAMP 1 /*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/ #define LV_LOG_TRACE_MEM 1 @@ -247,6 +254,7 @@ #define LV_LOG_TRACE_OBJ_CREATE 1 #define LV_LOG_TRACE_LAYOUT 1 #define LV_LOG_TRACE_ANIM 1 + #define LV_LOG_TRACE_MSG 1 #endif /*LV_USE_LOG*/ @@ -270,15 +278,20 @@ * Others *-----------*/ -/*1: Show CPU usage and FPS count*/ +/*1: Show CPU usage and FPS count + * Requires `LV_USE_SYSMON = 1`*/ #define LV_USE_PERF_MONITOR 0 #if LV_USE_PERF_MONITOR #define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT + + /*0: Displays performance data on the screen, 1: Prints performance data using log.*/ + #define LV_USE_PERF_MONITOR_LOG_MODE 0 #endif /*1: Show the used memory and the memory fragmentation - * Requires LV_MEM_CUSTOM = 0*/ -#define LV_USE_MEM_MONITOR 1 + * Requires `LV_USE_BUILTIN_MALLOC = 1` + * Requires `LV_USE_SYSMON = 1`*/ +#define LV_USE_MEM_MONITOR 0 #if LV_USE_MEM_MONITOR #define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT #endif @@ -286,17 +299,9 @@ /*1: Draw random colored rectangles over the redrawn areas*/ #define LV_USE_REFR_DEBUG 0 -/*Change the built in (v)snprintf functions*/ -#define LV_SPRINTF_CUSTOM 0 -#if LV_SPRINTF_CUSTOM - #define LV_SPRINTF_INCLUDE - #define lv_snprintf snprintf - #define lv_vsnprintf vsnprintf -#else /*LV_SPRINTF_CUSTOM*/ - #define LV_SPRINTF_USE_FLOAT 0 -#endif /*LV_SPRINTF_CUSTOM*/ - -#define LV_USE_USER_DATA 1 +/*Maximum buffer size to allocate for rotation. + *Only used if software rotation is enabled in the display driver.*/ +#define LV_DISP_ROT_MAX_BUF (10*1024) /*Garbage Collector settings *Used if lvgl is bound to higher level language and the memory is managed by that language*/ @@ -305,6 +310,22 @@ #define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/ #endif /*LV_ENABLE_GC*/ +/*Default image cache size. Image caching keeps some images opened. + *If only the built-in image formats are used there is no real advantage of caching. + *With other image decoders (e.g. PNG or JPG) caching save the continuous open/decode of images. + *However the opened images consume additional RAM. + *0: to disable caching*/ +#define LV_IMG_CACHE_DEF_SIZE 0 + + +/*Number of stops allowed per gradient. Increase this to allow more stops. + *This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/ +#define LV_GRADIENT_MAX_STOPS 2 + +/* Adjust color mix functions rounding. GPUs might calculate color mix (blending) differently. + * 0: round down, 64: round up from x.75, 128: round up from half, 192: round up from x.25, 254: round up */ +#define LV_COLOR_MIX_ROUND_OFS 0 + /*===================== * COMPILER SETTINGS *====================*/ @@ -337,8 +358,6 @@ /*Place performance critical functions into a faster memory (e.g RAM)*/ #define LV_ATTRIBUTE_FAST_MEM -/*Prefix variables that are used in GPU accelerated operations, often these need to be placed in RAM sections that are DMA accessible*/ -#define LV_ATTRIBUTE_DMA /*Export integer constant to binding. This macro is used with constants in the form of LV_ that *should also appear on LVGL binding API such as Micropython.*/ @@ -401,13 +420,6 @@ /*Enables/disables support for compressed fonts.*/ #define LV_USE_FONT_COMPRESSED 0 -/*Enable subpixel rendering*/ -#define LV_USE_FONT_SUBPX 0 -#if LV_USE_FONT_SUBPX - /*Set the pixel order of the display. Physical order of RGB channels. Doesn't matter with "normal" fonts.*/ - #define LV_FONT_SUBPX_BGR 0 /*0: RGB; 1:BGR order*/ -#endif - /*Enable drawing placeholders when glyph dsc is not found*/ #define LV_USE_FONT_PLACEHOLDER 1 @@ -424,7 +436,7 @@ #define LV_TXT_ENC LV_TXT_ENC_UTF8 /*Can break (wrap) texts on these chars*/ -#define LV_TXT_BREAK_CHARS " ,.;:-_" +#define LV_TXT_BREAK_CHARS " ,.;:-_)]}" /*If a word is at least this long, will break wherever "prettiest" *To disable, set to a value <= 0*/ @@ -458,11 +470,13 @@ #define LV_USE_ARABIC_PERSIAN_CHARS 0 /*================== - * WIDGET USAGE + * WIDGETS *================*/ /*Documentation of the widgets: https://docs.lvgl.io/latest/en/html/widgets/index.html*/ +#define LV_USE_ANIMIMG 1 + #define LV_USE_ARC 1 #define LV_USE_BAR 1 @@ -471,47 +485,6 @@ #define LV_USE_BTNMATRIX 1 -#define LV_USE_CANVAS 1 - -#define LV_USE_CHECKBOX 1 - -#define LV_USE_DROPDOWN 1 /*Requires: lv_label*/ - -#define LV_USE_IMG 1 /*Requires: lv_label*/ - -#define LV_USE_LABEL 1 -#if LV_USE_LABEL - #define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/ - #define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/ -#endif - -#define LV_USE_LINE 1 - -#define LV_USE_ROLLER 1 /*Requires: lv_label*/ -#if LV_USE_ROLLER - #define LV_ROLLER_INF_PAGES 7 /*Number of extra "pages" when the roller is infinite*/ -#endif - -#define LV_USE_SLIDER 1 /*Requires: lv_bar*/ - -#define LV_USE_SWITCH 1 - -#define LV_USE_TEXTAREA 1 /*Requires: lv_label*/ -#if LV_USE_TEXTAREA != 0 - #define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/ -#endif - -#define LV_USE_TABLE 1 - -/*================== - * EXTRA COMPONENTS - *==================*/ - -/*----------- - * Widgets - *----------*/ -#define LV_USE_ANIMIMG 1 - #define LV_USE_CALENDAR 1 #if LV_USE_CALENDAR #define LV_CALENDAR_WEEK_STARTS_MONDAY 0 @@ -526,16 +499,32 @@ #define LV_USE_CALENDAR_HEADER_DROPDOWN 1 #endif /*LV_USE_CALENDAR*/ +#define LV_USE_CANVAS 1 + #define LV_USE_CHART 1 +#define LV_USE_CHECKBOX 1 + #define LV_USE_COLORWHEEL 1 +#define LV_USE_DROPDOWN 1 /*Requires: lv_label*/ + +#define LV_USE_IMG 1 /*Requires: lv_label*/ + #define LV_USE_IMGBTN 1 #define LV_USE_KEYBOARD 1 +#define LV_USE_LABEL 1 +#if LV_USE_LABEL + #define LV_LABEL_TEXT_SELECTION 1 /*Enable selecting text of the label*/ + #define LV_LABEL_LONG_TXT_HINT 1 /*Store some extra info in labels to speed up drawing of very long texts*/ +#endif + #define LV_USE_LED 1 +#define LV_USE_LINE 1 + #define LV_USE_LIST 1 #define LV_USE_MENU 1 @@ -544,6 +533,10 @@ #define LV_USE_MSGBOX 1 +#define LV_USE_ROLLER 1 /*Requires: lv_label*/ + +#define LV_USE_SLIDER 1 /*Requires: lv_bar*/ + #define LV_USE_SPAN 1 #if LV_USE_SPAN /*A line text can contain maximum num of span descriptor */ @@ -554,15 +547,24 @@ #define LV_USE_SPINNER 1 +#define LV_USE_SWITCH 1 + +#define LV_USE_TEXTAREA 1 /*Requires: lv_label*/ +#if LV_USE_TEXTAREA != 0 + #define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/ +#endif + +#define LV_USE_TABLE 1 + #define LV_USE_TABVIEW 1 #define LV_USE_TILEVIEW 1 #define LV_USE_WIN 1 -/*----------- - * Themes - *----------*/ +/*================== + * THEMES + *==================*/ /*A simple, impressive and very complete theme*/ #define LV_USE_THEME_DEFAULT 1 @@ -584,9 +586,9 @@ /*A theme designed for monochrome displays*/ #define LV_USE_THEME_MONO 1 -/*----------- - * Layouts - *----------*/ +/*================== + * LAYOUTS + *==================*/ /*A layout similar to Flexbox in CSS.*/ #define LV_USE_FLEX 1 @@ -594,9 +596,9 @@ /*A layout similar to Grid in CSS.*/ #define LV_USE_GRID 1 -/*--------------------- - * 3rd party libraries - *--------------------*/ +/*==================== + * 3RD PARTS LIBRARIES + *====================*/ /*File system interfaces for common APIs */ @@ -647,21 +649,34 @@ /*QR code library*/ #define LV_USE_QRCODE 0 +/*Barcode code library*/ +#define LV_USE_BARCODE 0 + /*FreeType library*/ #define LV_USE_FREETYPE 0 #if LV_USE_FREETYPE - /*Memory used by FreeType to cache characters [bytes] (-1: no caching)*/ - #define LV_FREETYPE_CACHE_SIZE (16 * 1024) - #if LV_FREETYPE_CACHE_SIZE >= 0 - /* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */ - /* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */ - /* if font size >= 256, must be configured as image cache */ - #define LV_FREETYPE_SBIT_CACHE 0 - /* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */ - /* (0:use system defaults) */ - #define LV_FREETYPE_CACHE_FT_FACES 0 - #define LV_FREETYPE_CACHE_FT_SIZES 0 - #endif + /*Memory used by FreeType to cache characters [bytes]*/ + #define LV_FREETYPE_CACHE_SIZE (64 * 1024) + + /*Let FreeType to use LVGL memory and file porting*/ + #define LV_FREETYPE_USE_LVGL_PORT 0 + + /* 1: bitmap cache use the sbit cache, 0:bitmap cache use the image cache. */ + /* sbit cache:it is much more memory efficient for small bitmaps(font size < 256) */ + /* if font size >= 256, must be configured as image cache */ + #define LV_FREETYPE_SBIT_CACHE 0 + + /* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */ + /* (0:use system defaults) */ + #define LV_FREETYPE_CACHE_FT_FACES 4 + #define LV_FREETYPE_CACHE_FT_SIZES 4 +#endif + +/* Built-in TTF decoder */ +#define LV_USE_TINY_TTF 0 +#if LV_USE_TINY_TTF + /* Enable loading TTF data from files */ + #define LV_TINY_TTF_FILE_SUPPORT 0 #endif /*Rlottie library*/ @@ -675,13 +690,16 @@ #define LV_FFMPEG_DUMP_FORMAT 0 #endif -/*----------- - * Others - *----------*/ +/*================== + * OTHERS + *==================*/ /*1: Enable API to take snapshot for object*/ #define LV_USE_SNAPSHOT 0 +/*1: Enable system monitor component*/ +#define LV_USE_SYSMON 0 + /*1: Enable Monkey test*/ #define LV_USE_MONKEY 0 @@ -693,6 +711,13 @@ /*1: Support using images as font in label or span widgets */ #define LV_USE_IMGFONT 0 +#if LV_USE_IMGFONT + /*Imgfont image file path maximum length*/ + #define LV_IMGFONT_PATH_MAX_LEN 64 + + /*1: Use img cache to buffer header information*/ + #define LV_IMGFONT_USE_IMG_CACHE_HEADER 0 +#endif /*1: Enable a published subscriber based messaging system */ #define LV_USE_MSG 0 @@ -715,6 +740,38 @@ #endif // LV_IME_PINYIN_USE_K9_MODE #endif +/*1: Enable file explorer*/ +/*Requires: lv_table*/ +#define LV_USE_FILE_EXPLORER 0 +#if LV_USE_FILE_EXPLORER + /*Maximum length of path*/ + #define LV_FILE_EXPLORER_PATH_MAX_LEN (128) + /*Quick access bar, 1:use, 0:not use*/ + /*Requires: lv_list*/ + #define LV_FILE_EXPLORER_QUICK_ACCESS 1 +#endif + +/*================== + * DEVICES + *==================*/ + +/*Use SDL to open window on PC and handle mouse and keyboard*/ +#define LV_USE_SDL 0 +#if LV_USE_SDL + #define LV_SDL_INCLUDE_PATH + #define LV_SDL_PARTIAL_MODE 0 /*Recommended only to emulate a setup with a display controller*/ + #define LV_SDL_FULLSCREEN 0 +#endif + +/*Driver for /dev/fb*/ +#define LV_USE_LINUX_FBDEV 0 +#if LV_USE_LINUX_FBDEV + #define LV_LINUX_FBDEV_BSD 0 +#endif + +/*Interface for TFT_eSPI*/ +#define LV_USE_TFT_ESPI 0 + /*================== * EXAMPLES *==================*/ @@ -729,7 +786,7 @@ /*Show some widget. It might be required to increase `LV_MEM_SIZE` */ #define LV_USE_DEMO_WIDGETS 0 #if LV_USE_DEMO_WIDGETS -#define LV_DEMO_WIDGETS_SLIDESHOW 0 + #define LV_DEMO_WIDGETS_SLIDESHOW 0 #endif /*Demonstrate the usage of encoder and keyboard*/ @@ -738,8 +795,8 @@ /*Benchmark your system*/ #define LV_USE_DEMO_BENCHMARK 0 #if LV_USE_DEMO_BENCHMARK -/*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/ -#define LV_DEMO_BENCHMARK_RGB565A8 0 + /*Use RGB565A8 images with 16 bit color depth instead of ARGB8565*/ + #define LV_DEMO_BENCHMARK_RGB565A8 0 #endif /*Stress test for LVGL*/ @@ -755,6 +812,9 @@ #define LV_DEMO_MUSIC_AUTO_PLAY 0 #endif +/*Flex layout demo*/ +#define LV_USE_DEMO_FLEX_LAYOUT 0 + /*--END OF LV_CONF_H--*/ #endif /*LV_CONF_H*/ diff --git a/examples/include/lv_drv_conf.h b/examples/include/lv_drv_conf.h index 5c84efab..fc8a5237 100644 --- a/examples/include/lv_drv_conf.h +++ b/examples/include/lv_drv_conf.h @@ -1,6 +1,6 @@ /** * @file lv_drv_conf.h - * Configuration file for v8.3.0 + * Configuration file for v9.0.0-dev */ /* @@ -110,6 +110,9 @@ /*Open two windows to test multi display support*/ # define SDL_DUAL_DISPLAY 0 + +/* Window Title */ +# define SDL_WINDOW_TITLE "TFT Simulator" #endif /*------------------- @@ -316,7 +319,7 @@ * Linux frame buffer device (/dev/fbx) *-----------------------------------------*/ #ifndef USE_FBDEV -# define USE_FBDEV 1 +# define USE_FBDEV 0 #endif #if USE_FBDEV @@ -491,4 +494,4 @@ #endif /*LV_DRV_CONF_H*/ -#endif /*End of "Content enable"*/ +#endif /*End of "Content enable"*/ \ No newline at end of file diff --git a/lvgl-sys/vendor/lv_drivers b/lvgl-sys/vendor/lv_drivers index 1413f5eb..57494ff8 160000 --- a/lvgl-sys/vendor/lv_drivers +++ b/lvgl-sys/vendor/lv_drivers @@ -1 +1 @@ -Subproject commit 1413f5ebb6d21bc8ebb45448826dd7b4bbd3b7a3 +Subproject commit 57494ff8ec012fb6ea0a6d2e3c9485bace392d34 diff --git a/lvgl-sys/vendor/lvgl b/lvgl-sys/vendor/lvgl index 88c51b22..64009fec 160000 --- a/lvgl-sys/vendor/lvgl +++ b/lvgl-sys/vendor/lvgl @@ -1 +1 @@ -Subproject commit 88c51b22ad233c96c85b6a84c807ee848e3454fb +Subproject commit 64009fec232e5aeba660cf5afeabb2cc25aa0ac8