From 0da4115ba8a689c8afc449e4482fcec910fb1d79 Mon Sep 17 00:00:00 2001 From: YobeZhou Date: Thu, 4 Apr 2024 21:56:28 -0400 Subject: [PATCH 1/4] feat: update to v9.1.0 --- lvgl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lvgl b/lvgl index 09cb87c..e1c0b21 160000 --- a/lvgl +++ b/lvgl @@ -1 +1 @@ -Subproject commit 09cb87cdc6a0168a98bc0a3182a8439b13249ead +Subproject commit e1c0b21b2723d391b885de4b2ee5cc997eccca91 From 9d85b481536789bbbdb25856bbd088120258dcb9 Mon Sep 17 00:00:00 2001 From: YobeZhou Date: Fri, 5 Apr 2024 12:34:46 +0800 Subject: [PATCH 2/4] update lv_conf.h --- lv_conf.h | 86 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 26 deletions(-) diff --git a/lv_conf.h b/lv_conf.h index 962aab5..2b8df2f 100644 --- a/lv_conf.h +++ b/lv_conf.h @@ -1,6 +1,6 @@ /** * @file lv_conf.h - * Configuration file for v9.0.0 + * Configuration file for v9.1.0 */ /* @@ -17,6 +17,11 @@ #ifndef LV_CONF_H #define LV_CONF_H +/*If you need to include anything here, do it inside the `__ASSEMBLY__` guard */ +#if 0 && defined(__ASSEMBLY__) +#include "my_include.h" +#endif + /*==================== COLOR SETTINGS *====================*/ @@ -94,6 +99,14 @@ /*Align the start address of draw_buf addresses to this bytes*/ #define LV_DRAW_BUF_ALIGN 4 +/* 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. */ + +/*The target buffer size for simple layer chunks.*/ +#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/ + #define LV_USE_DRAW_SW 1 #if LV_USE_DRAW_SW == 1 /* Set the number of draw unit. @@ -104,13 +117,8 @@ /* Use Arm-2D to accelerate the sw render */ #define LV_USE_DRAW_ARM2D_SYNC 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 - * and can't be drawn in chunks. */ - - /*The target buffer size for simple layer chunks.*/ - #define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/ + /* Enable native helium assembly to be compiled */ + #define LV_USE_NATIVE_HELIUM_ASM 0 /* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only * 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */ @@ -176,6 +184,19 @@ /* 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 + +/* 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 + #endif /*======================= @@ -310,6 +331,9 @@ /*Enable 16 pixels alignment*/ #define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1 + /*Buffer address alignment*/ + #define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN 64 + /*Enable multi-thread render*/ #define LV_VG_LITE_THORVG_THREAD_RENDER 0 @@ -627,6 +651,12 @@ #define LV_FS_MEMFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ #endif +/*API for LittleFs. */ +#define LV_USE_FS_LITTLEFS 0 +#if LV_USE_FS_LITTLEFS + #define LV_FS_LITTLEFS_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 @@ -667,16 +697,11 @@ /*FreeType library*/ #define LV_USE_FREETYPE 0 #if LV_USE_FREETYPE - /*Memory used by FreeType to cache characters in kilobytes*/ - #define LV_FREETYPE_CACHE_SIZE 768 - /*Let FreeType to use LVGL memory and file porting*/ #define LV_FREETYPE_USE_LVGL_PORT 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 8 - #define LV_FREETYPE_CACHE_FT_SIZES 8 + /*Cache count of the glyphs in FreeType. It means the number of glyphs that can be cached. + *The higher the value, the more memory will be used.*/ #define LV_FREETYPE_CACHE_FT_GLYPH_CNT 256 #endif @@ -699,9 +724,6 @@ /* Enable ThorVG by assuming that its installed and linked to the project */ #define LV_USE_THORVG_EXTERNAL 0 -/*Enable LZ4 compress/decompress lib*/ -#define LV_USE_LZ4 0 - /*Use lvgl built-in LZ4 lib*/ #define LV_USE_LZ4_INTERNAL 0 @@ -826,11 +848,12 @@ /*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_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_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_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_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*/ #endif /*Use X11 to open window on Linux desktop and handle mouse and keyboard*/ @@ -883,6 +906,20 @@ /*Driver for evdev input devices*/ #define LV_USE_EVDEV 0 +/*Driver for libinput input devices*/ +#define LV_USE_LIBINPUT 0 + +#if LV_USE_LIBINPUT + #define LV_LIBINPUT_BSD 0 + + /*Full keyboard support*/ + #define LV_LIBINPUT_XKB 0 + #if LV_LIBINPUT_XKB + /*"setxkbmap -query" can help find the right values for your keyboard*/ + #define LV_LIBINPUT_XKB_KEY_MAP { .rules = NULL, .model = "pc101", .layout = "us", .variant = NULL, .options = NULL } + #endif +#endif + /*Drivers for LCD devices connected via SPI/parallel port*/ #define LV_USE_ST7735 0 #define LV_USE_ST7789 0 @@ -907,9 +944,6 @@ /*Show some widget. It might be required to increase `LV_MEM_SIZE` */ #define LV_USE_DEMO_WIDGETS 1 -#if LV_USE_DEMO_WIDGETS - #define LV_DEMO_WIDGETS_SLIDESHOW 0 -#endif /*Demonstrate the usage of encoder and keyboard*/ #define LV_USE_DEMO_KEYPAD_AND_ENCODER 0 From b84b1c1ae10b5739d205c51b67a025c7ed62feb5 Mon Sep 17 00:00:00 2001 From: YobeZhou Date: Fri, 5 Apr 2024 12:35:06 +0800 Subject: [PATCH 3/4] update main.c --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 7b7640c..c2d063c 100644 --- a/main.c +++ b/main.c @@ -50,7 +50,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLi LV_LOG_USER("LVGL initialization completed!"); /*Run the demo*/ - lv_demo_widgets(); + //lv_demo_widgets(); + char * demo_str[] = {"widgets"}; + lv_demos_create(demo_str, strlen((char * )demo_str)); while(1) { /* Periodically call the lv_task handler. From ddfb9f8e69a3c2941445ef34a9a664d925fcd495 Mon Sep 17 00:00:00 2001 From: YobeZhou Date: Fri, 5 Apr 2024 12:36:43 +0800 Subject: [PATCH 4/4] update project settings --- lvgl.cbp | 37 ++++++++++++++++++++++++++++++------- lvgl.layout | 24 ++++++++++++++++++++++-- 2 files changed, 52 insertions(+), 9 deletions(-) diff --git a/lvgl.cbp b/lvgl.cbp index 080bdae..3987c43 100644 --- a/lvgl.cbp +++ b/lvgl.cbp @@ -12,7 +12,7 @@