Skip to content

Commit 8aba1e9

Browse files
authored
Upgrade LVGL to v9.1 (lvgl#338)
1 parent 526656f commit 8aba1e9

File tree

2 files changed

+82
-33
lines changed

2 files changed

+82
-33
lines changed

lv_conf.h

Lines changed: 81 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @file lv_conf.h
3-
* Configuration file for v9.0.0
3+
* Configuration file for v9.1.0
44
*/
55

66
/*
@@ -17,6 +17,11 @@
1717
#ifndef LV_CONF_H
1818
#define LV_CONF_H
1919

20+
/*If you need to include anything here, do it inside the `__ASSEMBLY__` guard */
21+
#if 0 && defined(__ASSEMBLY__)
22+
#include "my_include.h"
23+
#endif
24+
2025
/*====================
2126
COLOR SETTINGS
2227
*====================*/
@@ -39,10 +44,16 @@
3944
#define LV_USE_STDLIB_STRING LV_STDLIB_BUILTIN
4045
#define LV_USE_STDLIB_SPRINTF LV_STDLIB_BUILTIN
4146

47+
#define LV_STDINT_INCLUDE <stdint.h>
48+
#define LV_STDDEF_INCLUDE <stddef.h>
49+
#define LV_STDBOOL_INCLUDE <stdbool.h>
50+
#define LV_INTTYPES_INCLUDE <inttypes.h>
51+
#define LV_LIMITS_INCLUDE <limits.h>
52+
#define LV_STDARG_INCLUDE <stdarg.h>
4253

4354
#if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
4455
/*Size of the memory available for `lv_malloc()` in bytes (>= 2kB)*/
45-
#define LV_MEM_SIZE (256 * 1024U) /*[bytes]*/
56+
#define LV_MEM_SIZE (64 * 1024U) /*[bytes]*/
4657

4758
/*Size of the memory expand for `lv_malloc()` in bytes*/
4859
#define LV_MEM_POOL_EXPAND_SIZE 0
@@ -54,7 +65,7 @@
5465
#undef LV_MEM_POOL_INCLUDE
5566
#undef LV_MEM_POOL_ALLOC
5667
#endif
57-
#endif /*LV_USE_MALLOC == LV_STDLIB_BUILTIN*/
68+
#endif /*LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN*/
5869

5970
/*====================
6071
HAL SETTINGS
@@ -94,6 +105,14 @@
94105
/*Align the start address of draw_buf addresses to this bytes*/
95106
#define LV_DRAW_BUF_ALIGN 4
96107

108+
/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
109+
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
110+
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
111+
* and can't be drawn in chunks. */
112+
113+
/*The target buffer size for simple layer chunks.*/
114+
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
115+
97116
#define LV_USE_DRAW_SW 1
98117
#if LV_USE_DRAW_SW == 1
99118
/* Set the number of draw unit.
@@ -104,13 +123,8 @@
104123
/* Use Arm-2D to accelerate the sw render */
105124
#define LV_USE_DRAW_ARM2D_SYNC 0
106125

107-
/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
108-
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
109-
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
110-
* and can't be drawn in chunks. */
111-
112-
/*The target buffer size for simple layer chunks.*/
113-
#define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
126+
/* Enable native helium assembly to be compiled */
127+
#define LV_USE_NATIVE_HELIUM_ASM 0
114128

115129
/* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only
116130
* 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */
@@ -176,6 +190,24 @@
176190
/* Enable VG-Lite assert. */
177191
#define LV_VG_LITE_USE_ASSERT 0
178192

193+
/* VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */
194+
#define LV_VG_LITE_FLUSH_MAX_COUNT 8
195+
196+
/* Enable border to simulate shadow
197+
* NOTE: which usually improves performance,
198+
* but does not guarantee the same rendering quality as the software. */
199+
#define LV_VG_LITE_USE_BOX_SHADOW 0
200+
201+
/* VG-Lite linear gradient image maximum cache number.
202+
* NOTE: The memory usage of a single gradient image is 4K bytes.
203+
*/
204+
#define LV_VG_LITE_LINEAER_GRAD_CACHE_CNT 32
205+
206+
/* VG-Lite radial gradient image maximum cache size.
207+
* NOTE: The memory usage of a single gradient image is radial grad radius * 4 bytes.
208+
*/
209+
#define LV_VG_LITE_RADIAL_GRAD_CACHE_CNT 32
210+
179211
#endif
180212

181213
/*=======================
@@ -328,6 +360,9 @@ extern void mp_lv_init_gc();
328360
/*Enable 16 pixels alignment*/
329361
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1
330362

363+
/*Buffer address alignment*/
364+
#define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN 64
365+
331366
/*Enable multi-thread render*/
332367
#define LV_VG_LITE_THORVG_THREAD_RENDER 0
333368

@@ -645,6 +680,18 @@ extern void mp_lv_init_gc();
645680
#define LV_FS_MEMFS_LETTER 'M' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
646681
#endif
647682

683+
/*API for LittleFs. */
684+
#define LV_USE_FS_LITTLEFS 0
685+
#if LV_USE_FS_LITTLEFS
686+
#define LV_FS_LITTLEFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
687+
#endif
688+
689+
/*API for Arduino LittleFs. */
690+
#define LV_USE_FS_ARDUINO_ESP_LITTLEFS 0
691+
#if LV_USE_FS_ARDUINO_ESP_LITTLEFS
692+
#define LV_FS_ARDUINO_ESP_LITTLEFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
693+
#endif
694+
648695
/*LODEPNG decoder library*/
649696
#define LV_USE_LODEPNG 1
650697

@@ -688,16 +735,11 @@ extern void mp_lv_init_gc();
688735
#define LV_USE_FREETYPE 0
689736
#endif
690737
#if LV_USE_FREETYPE
691-
/*Memory used by FreeType to cache characters in kilobytes*/
692-
#define LV_FREETYPE_CACHE_SIZE 768
693-
694738
/*Let FreeType to use LVGL memory and file porting*/
695739
#define LV_FREETYPE_USE_LVGL_PORT 0
696740

697-
/* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */
698-
/* (0:use system defaults) */
699-
#define LV_FREETYPE_CACHE_FT_FACES 8
700-
#define LV_FREETYPE_CACHE_FT_SIZES 8
741+
/*Cache count of the glyphs in FreeType. It means the number of glyphs that can be cached.
742+
*The higher the value, the more memory will be used.*/
701743
#define LV_FREETYPE_CACHE_FT_GLYPH_CNT 256
702744
#endif
703745

@@ -726,9 +768,6 @@ extern void mp_lv_init_gc();
726768
/* Enable ThorVG by assuming that its installed and linked to the project */
727769
#define LV_USE_THORVG_EXTERNAL 0
728770

729-
/*Enable LZ4 compress/decompress lib*/
730-
#define LV_USE_LZ4 0
731-
732771
/*Use lvgl built-in LZ4 lib*/
733772
#define LV_USE_LZ4_INTERNAL 0
734773

@@ -756,7 +795,6 @@ extern void mp_lv_init_gc();
756795

757796
/*1: Enable system monitor component*/
758797
#define LV_USE_SYSMON 0
759-
760798
#if LV_USE_SYSMON
761799
/*Get the idle percentage. E.g. uint32_t my_get_idle(void);*/
762800
#define LV_SYSMON_GET_IDLE lv_timer_get_idle
@@ -772,7 +810,7 @@ extern void mp_lv_init_gc();
772810
#endif
773811

774812
/*1: Show the used memory and the memory fragmentation
775-
* Requires `LV_USE_BUILTIN_MALLOC = 1`
813+
* Requires `LV_USE_STDLIB_MALLOC = LV_STDLIB_BUILTIN`
776814
* Requires `LV_USE_SYSMON = 1`*/
777815
#define LV_USE_MEM_MONITOR 0
778816
#if LV_USE_MEM_MONITOR
@@ -851,10 +889,10 @@ extern void mp_lv_init_gc();
851889
#endif
852890
#if LV_USE_FILE_EXPLORER
853891
/*Maximum length of path*/
854-
#define LV_FILE_EXPLORER_PATH_MAX_LEN (128)
892+
#define LV_FILE_EXPLORER_PATH_MAX_LEN (128)
855893
/*Quick access bar, 1:use, 0:not use*/
856894
/*Requires: lv_list*/
857-
#define LV_FILE_EXPLORER_QUICK_ACCESS 1
895+
#define LV_FILE_EXPLORER_QUICK_ACCESS 1
858896
#endif
859897

860898
/*==================
@@ -868,11 +906,12 @@ extern void mp_lv_init_gc();
868906
#define LV_USE_SDL 0
869907
#endif
870908
#if LV_USE_SDL
871-
#define LV_SDL_INCLUDE_PATH <SDL2/SDL.h>
872-
#define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/
873-
#define LV_SDL_BUF_COUNT 1 /*1 or 2*/
874-
#define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/
875-
#define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/
909+
#define LV_SDL_INCLUDE_PATH <SDL2/SDL.h>
910+
#define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/
911+
#define LV_SDL_BUF_COUNT 1 /*1 or 2*/
912+
#define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/
913+
#define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/
914+
#define LV_SDL_MOUSEWHEEL_MODE LV_SDL_MOUSEWHEEL_MODE_ENCODER /*LV_SDL_MOUSEWHEEL_MODE_ENCODER/CROWN*/
876915
#endif
877916

878917
/*Use X11 to open window on Linux desktop and handle mouse and keyboard*/
@@ -928,6 +967,19 @@ extern void mp_lv_init_gc();
928967
/*Driver for evdev input devices*/
929968
#define LV_USE_EVDEV 0
930969

970+
/*Driver for libinput input devices*/
971+
#define LV_USE_LIBINPUT 0
972+
#if LV_USE_LIBINPUT
973+
#define LV_LIBINPUT_BSD 0
974+
975+
/*Full keyboard support*/
976+
#define LV_LIBINPUT_XKB 0
977+
#if LV_LIBINPUT_XKB
978+
/*"setxkbmap -query" can help find the right values for your keyboard*/
979+
#define LV_LIBINPUT_XKB_KEY_MAP { .rules = NULL, .model = "pc101", .layout = "us", .variant = NULL, .options = NULL }
980+
#endif
981+
#endif
982+
931983
/*Drivers for LCD devices connected via SPI/parallel port*/
932984
#define LV_USE_ST7735 0
933985
#define LV_USE_ST7789 0
@@ -954,9 +1006,6 @@ extern void mp_lv_init_gc();
9541006

9551007
/*Show some widget. It might be required to increase `LV_MEM_SIZE` */
9561008
#define LV_USE_DEMO_WIDGETS 0
957-
#if LV_USE_DEMO_WIDGETS
958-
#define LV_DEMO_WIDGETS_SLIDESHOW 0
959-
#endif
9601009

9611010
/*Demonstrate the usage of encoder and keyboard*/
9621011
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 0

lvgl

Submodule lvgl updated 782 files

0 commit comments

Comments
 (0)