From 806f7c13e0c3b5f22468b09708e2b3469bfa6ca9 Mon Sep 17 00:00:00 2001 From: YobeZhou Date: Mon, 6 Jan 2025 18:59:00 +0800 Subject: [PATCH] feat: update to v9.2.2 --- .gitignore | 2 + lv_conf.h | 227 +++++++++++++++++++++++++++++-------- lvgl | 2 +- lvgl.cbp | 318 ++++++++++++++++++++++++++++++++++++++++++++++++++-- lvgl.layout | 40 ++----- 5 files changed, 505 insertions(+), 84 deletions(-) diff --git a/.gitignore b/.gitignore index f3f6d00..8ebad05 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,8 @@ Module.symvers Mkfile.old dkms.conf /*.depend +bin/ +obj/ .DS_Store .vscode diff --git a/lv_conf.h b/lv_conf.h index 2b8df2f..9be512e 100644 --- a/lv_conf.h +++ b/lv_conf.h @@ -1,6 +1,6 @@ -/** +/** * @file lv_conf.h - * Configuration file for v9.1.0 + * Configuration file for v9.2.2 */ /* @@ -26,7 +26,7 @@ COLOR SETTINGS *====================*/ -/*Color depth: 8 (A8), 16 (RGB565), 24 (RGB888), 32 (XRGB8888)*/ +/*Color depth: 1 (I1), 8 (L8), 16 (RGB565), 24 (RGB888), 32 (XRGB8888)*/ #define LV_COLOR_DEPTH 32 /*========================= @@ -44,10 +44,16 @@ #define LV_USE_STDLIB_STRING LV_STDLIB_BUILTIN #define LV_USE_STDLIB_SPRINTF LV_STDLIB_BUILTIN +#define LV_STDINT_INCLUDE +#define LV_STDDEF_INCLUDE +#define LV_STDBOOL_INCLUDE +#define LV_INTTYPES_INCLUDE +#define LV_LIMITS_INCLUDE +#define LV_STDARG_INCLUDE #if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN /*Size of the memory available for `lv_malloc()` in bytes (>= 2kB)*/ - #define LV_MEM_SIZE (256 * 1024U) /*[bytes]*/ + #define LV_MEM_SIZE (512 * 1024U) /*[bytes]*/ /*Size of the memory expand for `lv_malloc()` in bytes*/ #define LV_MEM_POOL_EXPAND_SIZE 0 @@ -59,7 +65,7 @@ #undef LV_MEM_POOL_INCLUDE #undef LV_MEM_POOL_ALLOC #endif -#endif /*LV_USE_MALLOC == LV_STDLIB_BUILTIN*/ +#endif /*LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN*/ /*==================== HAL SETTINGS @@ -82,12 +88,21 @@ * - LV_OS_CMSIS_RTOS2 * - LV_OS_RTTHREAD * - LV_OS_WINDOWS + * - LV_OS_MQX * - LV_OS_CUSTOM */ #define LV_USE_OS LV_OS_WINDOWS #if LV_USE_OS == LV_OS_CUSTOM #define LV_OS_CUSTOM_INCLUDE #endif +#if LV_USE_OS == LV_OS_FREERTOS + /* + * Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM + * than unblocking a task using an intermediary object such as a binary semaphore. + * RTOS task notifications can only be used when there is only one task that can be the recipient of the event. + */ + #define LV_USE_FREERTOS_TASK_NOTIFY 1 +#endif /*======================== * RENDERING CONFIGURATION @@ -99,6 +114,12 @@ /*Align the start address of draw_buf addresses to this bytes*/ #define LV_DRAW_BUF_ALIGN 4 +/*Using matrix for transformations. + *Requirements: + `LV_USE_MATRIX = 1`. + The rendering engine needs to support 3x3 matrix transformations.*/ +#define LV_DRAW_TRANSFORM_USE_MATRIX 0 + /* 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 @@ -107,11 +128,34 @@ /*The target buffer size for simple layer chunks.*/ #define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/ +/* The stack size of the drawing thread. + * NOTE: If FreeType or ThorVG is enabled, it is recommended to set it to 32KB or more. + */ +#define LV_DRAW_THREAD_STACK_SIZE (8 * 1024) /*[bytes]*/ + #define LV_USE_DRAW_SW 1 #if LV_USE_DRAW_SW == 1 - /* Set the number of draw unit. + + /* + * Selectively disable color format support in order to reduce code size. + * NOTE: some features use certain color formats internally, e.g. + * - gradients use RGB888 + * - bitmaps with transparency may use ARGB8888 + */ + + #define LV_DRAW_SW_SUPPORT_RGB565 1 + #define LV_DRAW_SW_SUPPORT_RGB565A8 1 + #define LV_DRAW_SW_SUPPORT_RGB888 1 + #define LV_DRAW_SW_SUPPORT_XRGB8888 1 + #define LV_DRAW_SW_SUPPORT_ARGB8888 1 + #define LV_DRAW_SW_SUPPORT_L8 1 + #define LV_DRAW_SW_SUPPORT_AL88 1 + #define LV_DRAW_SW_SUPPORT_A8 1 + #define LV_DRAW_SW_SUPPORT_I1 1 + + /* Set the number of draw unit. * > 1 requires an operating system enabled in `LV_USE_OS` - * > 1 means multiply threads will render the screen in parallel */ + * > 1 means multiple threads will render the screen in parallel */ #define LV_DRAW_SW_DRAW_UNIT_CNT 1 /* Use Arm-2D to accelerate the sw render */ @@ -142,6 +186,9 @@ #if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM #define LV_DRAW_SW_ASM_CUSTOM_INCLUDE "" #endif + + /* Enable drawing complex gradients in software: linear at an angle, radial or conical */ + #define LV_USE_DRAW_SW_COMPLEX_GRADIENTS 0 #endif /* Use NXP's VG-Lite GPU on iMX RTxxx platforms. */ @@ -152,8 +199,13 @@ #define LV_USE_VGLITE_BLIT_SPLIT 0 #if LV_USE_OS - /* Enable VGLite draw async. Queue multiple tasks and flash them once to the GPU. */ - #define LV_USE_VGLITE_DRAW_ASYNC 1 + /* Use additional draw thread for VG-Lite processing.*/ + #define LV_USE_VGLITE_DRAW_THREAD 1 + + #if LV_USE_VGLITE_DRAW_THREAD + /* Enable VGLite draw async. Queue multiple tasks and flash them once to the GPU. */ + #define LV_USE_VGLITE_DRAW_ASYNC 1 + #endif #endif /* Enable VGLite asserts. */ @@ -161,9 +213,20 @@ #endif /* Use NXP's PXP on iMX RTxxx platforms. */ -#define LV_USE_DRAW_PXP 0 +#define LV_USE_PXP 0 + +#if LV_USE_PXP + /* Use PXP for drawing.*/ + #define LV_USE_DRAW_PXP 1 + + /* Use PXP to rotate display.*/ + #define LV_USE_ROTATE_PXP 0 + + #if LV_USE_DRAW_PXP && LV_USE_OS + /* Use additional draw thread for PXP processing.*/ + #define LV_USE_PXP_DRAW_THREAD 1 + #endif -#if LV_USE_DRAW_PXP /* Enable PXP asserts. */ #define LV_USE_PXP_ASSERT 0 #endif @@ -178,24 +241,28 @@ #define LV_USE_DRAW_VG_LITE 0 #if LV_USE_DRAW_VG_LITE -/* Enable VG-Lite custom external 'gpu_init()' function */ -#define LV_VG_LITE_USE_GPU_INIT 0 + /* Enable VG-Lite custom external 'gpu_init()' function */ + #define LV_VG_LITE_USE_GPU_INIT 0 -/* Enable VG-Lite assert. */ -#define LV_VG_LITE_USE_ASSERT 0 + /* Enable VG-Lite assert. */ + #define LV_VG_LITE_USE_ASSERT 0 -/* VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */ -#define LV_VG_LITE_FLUSH_MAX_COUNT 8 + /* VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */ + #define LV_VG_LITE_FLUSH_MAX_COUNT 8 -/* Enable border to simulate shadow - * NOTE: which usually improves performance, - * but does not guarantee the same rendering quality as the software. */ -#define LV_VG_LITE_USE_BOX_SHADOW 0 + /* Enable border to simulate shadow + * NOTE: which usually improves performance, + * but does not guarantee the same rendering quality as the software. */ + #define LV_VG_LITE_USE_BOX_SHADOW 0 -/* VG-Lite gradient image maximum cache number. - * NOTE: The memory usage of a single gradient image is 4K bytes. - */ -#define LV_VG_LITE_GRAD_CACHE_SIZE 32 + /* VG-Lite gradient maximum cache number. + * NOTE: The memory usage of a single gradient image is 4K bytes. + */ + #define LV_VG_LITE_GRAD_CACHE_CNT 32 + + /* VG-Lite stroke maximum cache number. + */ + #define LV_VG_LITE_STROKE_CACHE_CNT 32 #endif @@ -208,7 +275,7 @@ *-----------*/ /*Enable the log module*/ -#define LV_USE_LOG 0 +#define LV_USE_LOG 1 #if LV_USE_LOG /*How important log should be added: @@ -222,7 +289,12 @@ /*1: Print the log with 'printf'; *0: User need to register a callback with `lv_log_register_print_cb()`*/ - #define LV_LOG_PRINTF 0 + #define LV_LOG_PRINTF 1 + + /*Set callback to print the logs. + *E.g `my_print`. The prototype should be `void my_print(lv_log_level_t level, const char * buf)` + *Can be overwritten by `lv_log_register_print_cb`*/ + //#define LV_LOG_PRINT_CB /*1: Enable print timestamp; *0: Disable print timestamp*/ @@ -232,6 +304,7 @@ *0: Do not print file and line number of the log*/ #define LV_LOG_USE_FILE_LINE 1 + /*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/ #define LV_LOG_TRACE_MEM 1 #define LV_LOG_TRACE_TIMER 1 @@ -310,12 +383,23 @@ /* Add `id` field to `lv_obj_t` */ #define LV_USE_OBJ_ID 0 -/* Use lvgl builtin method for obj ID */ -#define LV_USE_OBJ_ID_BUILTIN 0 +/* Automatically assign an ID when obj is created */ +#define LV_OBJ_ID_AUTO_ASSIGN LV_USE_OBJ_ID + +/*Use the builtin obj ID handler functions: +* - lv_obj_assign_id: Called when a widget is created. Use a separate counter for each widget class as an ID. +* - lv_obj_id_compare: Compare the ID to decide if it matches with a requested value. +* - lv_obj_stringify_id: Return e.g. "button3" +* - lv_obj_free_id: Does nothing, as there is no memory allocation for the ID. +* When disabled these functions needs to be implemented by the user.*/ +#define LV_USE_OBJ_ID_BUILTIN 1 /*Use obj property set/get API*/ #define LV_USE_OBJ_PROPERTY 0 +/*Enable property name support*/ +#define LV_USE_OBJ_PROPERTY_NAME 1 + /* VG-Lite Simulator */ /*Requires: LV_USE_THORVG_INTERNAL or LV_USE_THORVG_EXTERNAL */ #define LV_USE_VG_LITE_THORVG 0 @@ -328,6 +412,9 @@ /*Enable YUV color format support*/ #define LV_VG_LITE_THORVG_YUV_SUPPORT 0 + /*Enable Linear gradient extension support*/ + #define LV_VG_LITE_THORVG_LINEAR_GRADIENT_EXT_SUPPORT 0 + /*Enable 16 pixels alignment*/ #define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1 @@ -372,7 +459,7 @@ #define LV_ATTRIBUTE_FAST_MEM /*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.*/ + *should also appear on LVGL binding API such as MicroPython.*/ #define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/ /*Prefix all global extern data with this*/ @@ -381,6 +468,13 @@ /* Use `float` as `lv_value_precise_t` */ #define LV_USE_FLOAT 0 +/*Enable matrix support + *Requires `LV_USE_FLOAT = 1`*/ +#define LV_USE_MATRIX 0 + +/*Include `lvgl_private.h` in `lvgl.h` to access internal data and functions by default*/ +#define LV_USE_PRIVATE_API 0 + /*================== * FONT USAGE *===================*/ @@ -412,6 +506,7 @@ /*Demonstrate special features*/ #define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/ #define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Persian letters and all their forms*/ +#define LV_FONT_SIMSUN_14_CJK 0 /*1000 most common CJK radicals*/ #define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/ /*Pixel perfect monospace fonts*/ @@ -477,7 +572,7 @@ #endif /*Enable Arabic/Persian processing - *In these languages characters should be replaced with an other form based on their position in the text*/ + *In these languages characters should be replaced with another form based on their position in the text*/ #define LV_USE_ARABIC_PERSIAN_CHARS 0 /*================== @@ -510,6 +605,7 @@ #define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} #define LV_USE_CALENDAR_HEADER_ARROW 1 #define LV_USE_CALENDAR_HEADER_DROPDOWN 1 + #define LV_USE_CALENDAR_CHINESE 0 #endif /*LV_USE_CALENDAR*/ #define LV_USE_CANVAS 1 @@ -539,6 +635,8 @@ #define LV_USE_LIST 1 +#define LV_USE_LOTTIE 0 /*Requires: lv_canvas, thorvg */ + #define LV_USE_MENU 1 #define LV_USE_MSGBOX 1 @@ -614,6 +712,9 @@ /*File system interfaces for common APIs */ +/*Setting a default driver letter allows skipping the driver prefix in filepaths*/ +#define LV_FS_DEFAULT_DRIVE_LETTER '\0' + /*API for fopen, fread, etc*/ #define LV_USE_FS_STDIO 0 #if LV_USE_FS_STDIO @@ -657,6 +758,18 @@ #define LV_FS_LITTLEFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ #endif +/*API for Arduino LittleFs. */ +#define LV_USE_FS_ARDUINO_ESP_LITTLEFS 0 +#if LV_USE_FS_ARDUINO_ESP_LITTLEFS + #define LV_FS_ARDUINO_ESP_LITTLEFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ +#endif + +/*API for Arduino Sd. */ +#define LV_USE_FS_ARDUINO_SD 0 +#if LV_USE_FS_ARDUINO_SD + #define LV_FS_ARDUINO_SD_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ +#endif + /*LODEPNG decoder library*/ #define LV_USE_LODEPNG 0 @@ -677,8 +790,8 @@ /*GIF decoder library*/ #define LV_USE_GIF 0 #if LV_USE_GIF -/*GIF decoder accelerate*/ -#define LV_GIF_CACHE_DECODE_DATA 0 + /*GIF decoder accelerate*/ + #define LV_GIF_CACHE_DECODE_DATA 0 #endif @@ -710,12 +823,14 @@ #if LV_USE_TINY_TTF /* Enable loading TTF data from files */ #define LV_TINY_TTF_FILE_SUPPORT 0 + #define LV_TINY_TTF_CACHE_GLYPH_CNT 256 #endif /*Rlottie library*/ #define LV_USE_RLOTTIE 0 -/*Enable Vector Graphic APIs*/ +/*Enable Vector Graphic APIs + *Requires `LV_USE_MATRIX = 1`*/ #define LV_USE_VECTOR_GRAPHIC 0 /* Enable ThorVG (vector graphics library) from the src/libs folder */ @@ -762,7 +877,7 @@ #endif /*1: Show the used memory and the memory fragmentation - * Requires `LV_USE_BUILTIN_MALLOC = 1` + * Requires `LV_USE_STDLIB_MALLOC = LV_STDLIB_BUILTIN` * Requires `LV_USE_SYSMON = 1`*/ #define LV_USE_MEM_MONITOR 0 #if LV_USE_MEM_MONITOR @@ -817,7 +932,7 @@ #define LV_USE_IME_PINYIN 0 #if LV_USE_IME_PINYIN /*1: Use default thesaurus*/ - /*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/ + /*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesaurus*/ #define LV_IME_PINYIN_USE_DEFAULT_DICT 1 /*Set the maximum number of candidate panels that can be displayed*/ /*This needs to be adjusted according to the size of the screen*/ @@ -851,6 +966,7 @@ #define LV_SDL_INCLUDE_PATH #define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/ #define LV_SDL_BUF_COUNT 1 /*1 or 2*/ + #define LV_SDL_ACCELERATED 1 /*1: Use hardware acceleration*/ #define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/ #define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/ #define LV_SDL_MOUSEWHEEL_MODE LV_SDL_MOUSEWHEEL_MODE_ENCODER /*LV_SDL_MOUSEWHEEL_MODE_ENCODER/CROWN*/ @@ -860,13 +976,20 @@ #define LV_USE_X11 0 #if LV_USE_X11 #define LV_X11_DIRECT_EXIT 1 /*Exit the application when all X11 windows have been closed*/ - #define LV_X11_DOUBLE_BUFFER 1 /*Use double buffers for endering*/ + #define LV_X11_DOUBLE_BUFFER 1 /*Use double buffers for rendering*/ /*select only 1 of the following render modes (LV_X11_RENDER_MODE_PARTIAL preferred!)*/ #define LV_X11_RENDER_MODE_PARTIAL 1 /*Partial render mode (preferred)*/ #define LV_X11_RENDER_MODE_DIRECT 0 /*direct render mode*/ #define LV_X11_RENDER_MODE_FULL 0 /*Full render mode*/ #endif +/*Use Wayland to open a window and handle input on Linux or BSD desktops */ +#define LV_USE_WAYLAND 0 +#if LV_USE_WAYLAND + #define LV_WAYLAND_WINDOW_DECORATIONS 0 /*Draw client side window decorations only necessary on Mutter/GNOME*/ + #define LV_WAYLAND_WL_SHELL 0 /*Use the legacy wl_shell protocol instead of the default XDG shell*/ +#endif + /*Driver for /dev/fb*/ #define LV_USE_LINUX_FBDEV 0 #if LV_USE_LINUX_FBDEV @@ -921,22 +1044,37 @@ #endif /*Drivers for LCD devices connected via SPI/parallel port*/ -#define LV_USE_ST7735 0 -#define LV_USE_ST7789 0 -#define LV_USE_ST7796 0 -#define LV_USE_ILI9341 0 +#define LV_USE_ST7735 0 +#define LV_USE_ST7789 0 +#define LV_USE_ST7796 0 +#define LV_USE_ILI9341 0 #define LV_USE_GENERIC_MIPI (LV_USE_ST7735 | LV_USE_ST7789 | LV_USE_ST7796 | LV_USE_ILI9341) +/*Driver for Renesas GLCD*/ +#define LV_USE_RENESAS_GLCDC 0 + /* LVGL Windows backend */ #define LV_USE_WINDOWS 1 +/* Use OpenGL to open window on PC and handle mouse and keyboard */ +#define LV_USE_OPENGLES 0 +#if LV_USE_OPENGLES + #define LV_USE_OPENGLES_DEBUG 1 /* Enable or disable debug for opengles */ +#endif + +/* QNX Screen display and input drivers */ +#define LV_USE_QNX 0 +#if LV_USE_QNX + #define LV_QNX_BUF_COUNT 1 /*1 or 2*/ +#endif + /*================== * EXAMPLES *==================*/ /*Enable the examples to be built with the library*/ -#define LV_BUILD_EXAMPLES 0 +#define LV_BUILD_EXAMPLES 1 /*=================== * DEMO USAGE @@ -955,10 +1093,10 @@ #define LV_USE_DEMO_RENDER 0 /*Stress test for LVGL*/ -#define LV_USE_DEMO_STRESS 0 +#define LV_USE_DEMO_STRESS 1 /*Music player demo*/ -#define LV_USE_DEMO_MUSIC 0 +#define LV_USE_DEMO_MUSIC 1 #if LV_USE_DEMO_MUSIC #define LV_DEMO_MUSIC_SQUARE 0 #define LV_DEMO_MUSIC_LANDSCAPE 0 @@ -981,6 +1119,7 @@ /*Vector graphic demo*/ #define LV_USE_DEMO_VECTOR_GRAPHIC 0 + /*--END OF LV_CONF_H--*/ #endif /*LV_CONF_H*/ diff --git a/lvgl b/lvgl index e1c0b21..c903c1d 160000 --- a/lvgl +++ b/lvgl @@ -1 +1 @@ -Subproject commit e1c0b21b2723d391b885de4b2ee5cc997eccca91 +Subproject commit c903c1dc0fdfae20bce69d0a48894bdebae278ff diff --git a/lvgl.cbp b/lvgl.cbp index 79506a5..9c5ed23 100644 --- a/lvgl.cbp +++ b/lvgl.cbp @@ -52,6 +52,9 @@ + + @@ -370,6 +373,12 @@ + + + + @@ -571,6 +580,9 @@ + +