-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LVGL: Add support of LVGL9 into LVGL port
(cherry picked from commit 5431be8)
- Loading branch information
Showing
28 changed files
with
3,472 additions
and
1,596 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Changelog | ||
|
||
## 1.5.0 | ||
|
||
### Features | ||
|
||
- Divided into files per feature | ||
- Added support for LVGL9 | ||
|
||
## 1.4.0 | ||
|
||
### Features | ||
|
||
- Added support for USB HID mouse/keyboard as an input device | ||
|
||
## 1.3.0 | ||
|
||
### Features | ||
|
||
- Added low power interface | ||
|
||
## 1.2.0 | ||
|
||
### Features | ||
|
||
- Added support for encoder (knob) as an input device | ||
|
||
## 1.1.0 | ||
|
||
### Features | ||
|
||
- Added support for navigation buttons as an input device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,64 @@ | ||
file(GLOB_RECURSE IMAGE_SOURCES images/*.c) | ||
|
||
idf_component_register(SRCS "esp_lvgl_port.c" ${IMAGE_SOURCES} INCLUDE_DIRS "include" REQUIRES "esp_lcd" PRIV_REQUIRES "esp_timer") | ||
#Get LVGL version | ||
idf_component_get_property(lvgl_ver lvgl__lvgl COMPONENT_VERSION) | ||
if(lvgl_ver EQUAL "") | ||
idf_component_get_property(lvgl_ver lvgl COMPONENT_VERSION) | ||
endif() | ||
message(STATUS "LVGL version: ${lvgl_ver}") | ||
|
||
#Select folder by LVGL version | ||
if(lvgl_ver VERSION_LESS "9.0.0") | ||
message(VERBOSE "Compiling esp_lvgl_port for LVGL8") | ||
set(PORT_FOLDER "lvgl8") | ||
else() | ||
message(VERBOSE "Compiling esp_lvgl_port for LVGL9") | ||
set(PORT_FOLDER "lvgl9") | ||
endif() | ||
|
||
set(PORT_PATH "src/${PORT_FOLDER}") | ||
|
||
idf_component_register(SRCS "${PORT_PATH}/esp_lvgl_port.c" "${PORT_PATH}/esp_lvgl_port_disp.c" INCLUDE_DIRS "include" REQUIRES "esp_lcd" PRIV_REQUIRES "esp_timer") | ||
|
||
set(ADD_SRCS "") | ||
set(ADD_LIBS "") | ||
|
||
idf_build_get_property(build_components BUILD_COMPONENTS) | ||
if("espressif__button" IN_LIST build_components) | ||
target_link_libraries(${COMPONENT_LIB} PRIVATE idf::espressif__button) | ||
list(APPEND ADD_SRCS "${PORT_PATH}/esp_lvgl_port_button.c") | ||
list(APPEND ADD_LIBS idf::espressif__button) | ||
endif() | ||
if("button" IN_LIST build_components) | ||
target_link_libraries(${COMPONENT_LIB} PRIVATE idf::button) | ||
list(APPEND ADD_SRCS "${PORT_PATH}/esp_lvgl_port_button.c") | ||
list(APPEND ADD_LIBS idf::button) | ||
endif() | ||
if("espressif__esp_lcd_touch" IN_LIST build_components) | ||
target_link_libraries(${COMPONENT_LIB} PRIVATE idf::espressif__esp_lcd_touch) | ||
list(APPEND ADD_SRCS "${PORT_PATH}/esp_lvgl_port_touch.c") | ||
list(APPEND ADD_LIBS idf::espressif__esp_lcd_touch) | ||
endif() | ||
if("esp_lcd_touch" IN_LIST build_components) | ||
target_link_libraries(${COMPONENT_LIB} PRIVATE idf::esp_lcd_touch) | ||
list(APPEND ADD_SRCS "${PORT_PATH}/esp_lvgl_port_touch.c") | ||
list(APPEND ADD_LIBS idf::esp_lcd_touch) | ||
endif() | ||
if("espressif__knob" IN_LIST build_components) | ||
target_link_libraries(${COMPONENT_LIB} PRIVATE idf::espressif__knob) | ||
list(APPEND ADD_SRCS "${PORT_PATH}/esp_lvgl_port_knob.c") | ||
list(APPEND ADD_LIBS idf::espressif__knob) | ||
endif() | ||
if("knob" IN_LIST build_components) | ||
target_link_libraries(${COMPONENT_LIB} PRIVATE idf::knob) | ||
list(APPEND ADD_SRCS "${PORT_PATH}/esp_lvgl_port_knob.c") | ||
list(APPEND ADD_LIBS idf::knob) | ||
endif() | ||
if("espressif__usb_host_hid" IN_LIST build_components) | ||
target_link_libraries(${COMPONENT_LIB} PRIVATE idf::espressif__usb_host_hid) | ||
list(APPEND ADD_SRCS "${PORT_PATH}/esp_lvgl_port_usbhid.c" "images/${PORT_FOLDER}/img_cursor.c") | ||
list(APPEND ADD_LIBS idf::espressif__usb_host_hid) | ||
endif() | ||
if("usb_host_hid" IN_LIST build_components) | ||
target_link_libraries(${COMPONENT_LIB} PRIVATE idf::usb_host_hid) | ||
list(APPEND ADD_SRCS "${PORT_PATH}/esp_lvgl_port_usbhid.c" "images/${PORT_FOLDER}/img_cursor.c") | ||
list(APPEND ADD_LIBS idf::usb_host_hid) | ||
endif() | ||
|
||
if(ADD_SRCS) | ||
target_sources(${COMPONENT_LIB} PRIVATE ${ADD_SRCS}) | ||
endif() | ||
if(ADD_LIBS) | ||
target_link_libraries(${COMPONENT_LIB} PRIVATE ${ADD_LIBS}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.