Skip to content

Commit 47c9b32

Browse files
fix(esp_lvgl_port): Add support for LVGL 9.2 and above
1 parent 56792df commit 47c9b32

File tree

5 files changed

+19
-20
lines changed

5 files changed

+19
-20
lines changed

components/esp_lvgl_port/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Changelog
22

3-
## 2.5.0
3+
## 2.5.0 [Unreleased]
44

55
### Features (Functional change for button v4 users)
66
- Updated LVGL port for using IoT button component v4 (LVGL port not anymore creating button, need to be created in app and included handle to LVGL port)
7+
- Added SIMD support also for LVGL 9.2 and above
78

89
### Fixes
910
- Fixed buffer size by selected color format

components/esp_lvgl_port/CMakeLists.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ endif()
2424

2525
if("${lvgl_ver}" STREQUAL "")
2626
message("Could not determine LVGL version, assuming v9.x")
27-
set(lvgl_ver "9.0.0")
27+
set(lvgl_ver "9.1.0") # With 9.1 we assume support for SIMD acceleration
2828
endif()
2929

3030
# Select folder by LVGL version
@@ -77,9 +77,8 @@ if("usb_host_hid" IN_LIST build_components)
7777
endif()
7878

7979
# Include SIMD assembly source code for rendering, only for (9.1.0 <= LVG_version < 9.2.0) and only for esp32 and esp32s3
80-
if((lvgl_ver VERSION_GREATER_EQUAL "9.1.0") AND (lvgl_ver VERSION_LESS "9.2.0"))
80+
if((lvgl_ver VERSION_GREATER_EQUAL "9.1.0"))
8181
if(CONFIG_IDF_TARGET_ESP32 OR CONFIG_IDF_TARGET_ESP32S3)
82-
message(VERBOSE "Compiling SIMD")
8382
if(CONFIG_IDF_TARGET_ESP32S3)
8483
file(GLOB_RECURSE ASM_SRCS ${PORT_PATH}/simd/*_esp32s3.S) # Select only esp32s3 related files
8584
else()

components/esp_lvgl_port/include/esp_lvgl_port_lv_blend.h

+13
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ extern "C" {
1818
#warning "esp_lvgl_port_lv_blend.h included, but CONFIG_LV_DRAW_SW_ASM_CUSTOM not set. Assembly rendering not used"
1919
#else
2020

21+
#include "lvgl.h"
22+
23+
/**
24+
* LVGL 9.2 changed the blending API compared to 9.1
25+
* The types were moved to lv_draw_sw_blend_private.h
26+
* and the leading underscore from type names was removed
27+
*/
28+
#if __has_include("draw/sw/blend/lv_draw_sw_blend_private.h")
29+
#include "draw/sw/blend/lv_draw_sw_blend_private.h"
30+
#define _lv_draw_sw_blend_fill_dsc_t lv_draw_sw_blend_fill_dsc_t
31+
#define _lv_draw_sw_blend_image_dsc_t lv_draw_sw_blend_image_dsc_t
32+
#endif
33+
2134
/*********************
2235
* DEFINES
2336
*********************/
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
set(LV_DEMO_DIR "")
2-
set(LV_DEMOS_SOURCES "")
3-
if(CONFIG_LV_USE_DEMO_BENCHMARK)
4-
list(APPEND LV_DEMO_DIR ../managed_components/lvgl__lvgl/demos)
5-
file(GLOB_RECURSE LV_DEMOS_SOURCES ${LV_DEMO_DIR}/*.c)
6-
endif()
7-
81
idf_component_register(
9-
SRCS "dispaly_lvgl_demos_main.c" ${LV_DEMOS_SOURCES}
10-
INCLUDE_DIRS "." ${LV_DEMO_DIR})
11-
12-
if(CONFIG_LV_USE_DEMO_BENCHMARK)
13-
set_source_files_properties(
14-
${LV_DEMOS_SOURCES}
15-
PROPERTIES COMPILE_OPTIONS
16-
-DLV_LVGL_H_INCLUDE_SIMPLE)
17-
endif()
2+
SRCS "display_lvgl_demos_main.c"
3+
INCLUDE_DIRS ".")

0 commit comments

Comments
 (0)