From 34d520c7eed99bba23371bf6ad5a159050bae984 Mon Sep 17 00:00:00 2001 From: Tomas Rezucha Date: Tue, 23 Feb 2021 16:00:21 +0100 Subject: [PATCH 1/3] Make this repository a single ESP-IDF component --- CMakeLists.txt | 79 ++++++++++++++++++++++++++++++++++++++- KConfig | 2 + component.mk | 45 ++++++++++++++++++++-- lvgl_tft/CMakeLists.txt | 55 --------------------------- lvgl_tft/component.mk | 26 ------------- lvgl_touch/CMakeLists.txt | 34 ----------------- lvgl_touch/component.mk | 4 -- 7 files changed, 122 insertions(+), 123 deletions(-) create mode 100644 KConfig delete mode 100644 lvgl_tft/CMakeLists.txt delete mode 100644 lvgl_tft/component.mk delete mode 100644 lvgl_touch/CMakeLists.txt delete mode 100644 lvgl_touch/component.mk diff --git a/CMakeLists.txt b/CMakeLists.txt index ff54b6a..6efcbc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,86 @@ if(ESP_PLATFORM) file(GLOB SOURCES *.c) +set(LVGL_INCLUDE_DIRS . lvgl_tft) +list(APPEND SOURCES "lvgl_tft/disp_driver.c") + +#@todo add SimleInclude macro here + +# Include only the source file of the selected +# display controller. +if(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341) + list(APPEND SOURCES "lvgl_tft/ili9341.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9481) + list(APPEND SOURCES "lvgl_tft/ili9481.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9486) + list(APPEND SOURCES "lvgl_tft/ili9486.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9488) + list(APPEND SOURCES "lvgl_tft/ili9488.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7789) + list(APPEND SOURCES "lvgl_tft/st7789.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7735S) + list(APPEND SOURCES "lvgl_tft/st7735s.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7796S) + list(APPEND SOURCES "lvgl_tft/st7796s.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_HX8357) + list(APPEND SOURCES "lvgl_tft/hx8357.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_SH1107) + list(APPEND SOURCES "lvgl_tft/sh1107.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_SSD1306) + list(APPEND SOURCES "lvgl_tft/ssd1306.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X) + list(APPEND SOURCES "lvgl_tft/EVE_commands.c") + list(APPEND SOURCES "lvgl_tft/FT81x.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_IL3820) + list(APPEND SOURCES "lvgl_tft/il3820.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_JD79653A) + list(APPEND SOURCES "lvgl_tft/jd79653a.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_UC8151D) + list(APPEND SOURCES "lvgl_tft/uc8151d.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_RA8875) + list(APPEND SOURCES "lvgl_tft/ra8875.c") +elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_GC9A01) + list(APPEND SOURCES "lvgl_tft/GC9A01.c") +else() + message(WARNING "LVGL ESP32 drivers: Display controller not defined.") +endif() + +if(CONFIG_LV_TFT_DISPLAY_PROTOCOL_SPI) + list(APPEND SOURCES "lvgl_tft/disp_spi.c") +endif() + +# Add touch driver to compilation only if it is selected in menuconfig +if(CONFIG_LV_TOUCH_CONTROLLER) + list(APPEND SOURCES "lvgl_touch/touch_driver.c") + list(APPEND LVGL_INCLUDE_DIRS lvgl_touch) + + # Include only the source file of the selected + # touch controller. + if(CONFIG_LV_TOUCH_CONTROLLER_XPT2046) + list(APPEND SOURCES "lvgl_touch/xpt2046.c") + elseif(CONFIG_LV_TOUCH_CONTROLLER_FT6X06) + list(APPEND SOURCES "lvgl_touch/ft6x36.c") + elseif(CONFIG_LV_TOUCH_CONTROLLER_STMPE610) + list(APPEND SOURCES "lvgl_touch/stmpe610.c") + elseif(CONFIG_LV_TOUCH_CONTROLLER_ADCRAW) + list(APPEND SOURCES "lvgl_touch/adcraw.c") + elseif(CONFIG_LV_TOUCH_CONTROLLER_FT81X) + list(APPEND SOURCES "lvgl_touch/FT81x.c") + elseif(CONFIG_LV_TOUCH_CONTROLLER_RA8875) + list(APPEND SOURCES "lvgl_touch/ra8875_touch.c") + endif() + + if(CONFIG_LV_TOUCH_DRIVER_PROTOCOL_SPI) + list(APPEND SOURCES "lvgl_touch/tp_spi.c") + elseif(CONFIG_LV_TOUCH_DRIVER_PROTOCOL_I2C) + list(APPEND SOURCES "lvgl_touch/tp_i2c.c") + endif() +endif() idf_component_register(SRCS ${SOURCES} - INCLUDE_DIRS . + INCLUDE_DIRS ${LVGL_INCLUDE_DIRS} REQUIRES lvgl) +else() + message(FATAL_ERROR "LVGL ESP32 drivers: ESP_PLATFORM is not defined. Try reinstalling ESP-IDF.") endif() diff --git a/KConfig b/KConfig new file mode 100644 index 0000000..80509c6 --- /dev/null +++ b/KConfig @@ -0,0 +1,2 @@ +rsource "lvgl_tft/Kconfig" +rsource "lvgl_touch/KConfig" diff --git a/component.mk b/component.mk index 5a4522d..1ce9d8f 100644 --- a/component.mk +++ b/component.mk @@ -1,9 +1,48 @@ -# LVGL esp32 drivers +# LVGL ESP32 drivers +# Compile everything in this folder unconditionally COMPONENT_SRCDIRS := . - COMPONENT_ADD_INCLUDEDIRS := . + +# LVGL is supposed to be used as a ESP-IDF component +# -> lvlg is already in the include path +# -> we use simple include +CFLAGS += -DLV_LVGL_H_INCLUDE_SIMPLE + +# TFT display drivers COMPONENT_ADD_INCLUDEDIRS += lvgl_tft +COMPONENT_OBJS := lvgl_tft/disp_driver.o + +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341),lvgl_tft/ili9341.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9481),lvgl_tft/ili9491.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9486),lvgl_tft/ili9486.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9488),lvgl_tft/ili9488.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7789),lvgl_tft/st7789.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7735S),lvgl_tft/st7735s.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7796S),lvgl_tft/st7796s.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_HX8357),lvgl_tft/hx8357.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_SH1107),lvgl_tft/sh1107.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_SSD1306),lvgl_tft/ssd1306.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X),lvgl_tft/EVE_commands.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X),lvgl_tft/FT81x.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_IL3820),lvgl_tft/il3820.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_JD79653A),lvgl_tft/jd79653a.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_UC8151D),lvgl_tft/uc8151d.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_RA8875),lvgl_tft/ra8875.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_GC9A01),lvgl_tft/gc9a01.o) + +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_PROTOCOL_SPI),lvgl_tft/disp_spi.o) + +# Touch controller drivers COMPONENT_ADD_INCLUDEDIRS += lvgl_touch -CFLAGS += -DLV_LVGL_H_INCLUDE_SIMPLE +$(call compile_only_if,$(CONFIG_LV_TOUCH_CONTROLLER),lvgl_touch/touch_driver.o) +$(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_XPT2046T)), lvgl_touch/xpt2046.o) +$(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_FT6X06)), lvgl_touch/ft6x36.o) +$(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_STMPE610)), lvgl_touch/stmpe610.o) +$(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_ADCRAW)), lvgl_touch/adcraw.o) +$(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_FT81X)), lvgl_touch/FT81x.o) +$(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_RA8875)), lvgl_touch/ra8875_touch.o) + +$(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_DRIVER_PROTOCOL_SPI)), lvgl_touch/tp_spi.o) +$(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_DRIVER_PROTOCOL_I2C)), lvgl_touch/tp_i2c.o) diff --git a/lvgl_tft/CMakeLists.txt b/lvgl_tft/CMakeLists.txt deleted file mode 100644 index 04def8d..0000000 --- a/lvgl_tft/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ -if(ESP_PLATFORM) - -set(SOURCES "disp_driver.c") - -# Include only the source file of the selected -# display controller. -if(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341) - list(APPEND SOURCES "ili9341.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9481) - list(APPEND SOURCES "ili9481.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9486) - list(APPEND SOURCES "ili9486.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9488) - list(APPEND SOURCES "ili9488.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7789) - list(APPEND SOURCES "st7789.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7735S) - list(APPEND SOURCES "st7735s.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7796S) - list(APPEND SOURCES "st7796s.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_HX8357) - list(APPEND SOURCES "hx8357.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_SH1107) - list(APPEND SOURCES "sh1107.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_SSD1306) - list(APPEND SOURCES "ssd1306.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X) - list(APPEND SOURCES "EVE_commands.c") - list(APPEND SOURCES "FT81x.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_IL3820) - list(APPEND SOURCES "il3820.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_JD79653A) - list(APPEND SOURCES "jd79653a.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_UC8151D) - list(APPEND SOURCES "uc8151d.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_RA8875) - list(APPEND SOURCES "ra8875.c") -elseif(CONFIG_LV_TFT_DISPLAY_CONTROLLER_GC9A01) - list(APPEND SOURCES "GC9A01.c") -else() - message("DISPLAY CONTROLLER NOT DEFINED") -endif() - -if(CONFIG_LV_TFT_DISPLAY_PROTOCOL_SPI) - list(APPEND SOURCES "disp_spi.c") -endif() - -# Print the included source files -message("SOURCES contents: " "${SOURCES}") - -idf_component_register(SRCS ${SOURCES} - INCLUDE_DIRS . - REQUIRES lvgl) - -endif() diff --git a/lvgl_tft/component.mk b/lvgl_tft/component.mk deleted file mode 100644 index 62c7c0e..0000000 --- a/lvgl_tft/component.mk +++ /dev/null @@ -1,26 +0,0 @@ -# TFT drivers - -COMPONENT_SRCDIRS := . -COMPONENT_ADD_INCLUDEDIRS := . - -COMPONENT_OBJS := disp_driver.o - -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341),ili9341.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9481),ili9491.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9486),ili9486.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9488),ili9488.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7789),st7789.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7735S),st7735s.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7796S),st7796s.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_HX8357),hx8357.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_SH1107),sh1107.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_SSD1306),ssd1306.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X),EVE_commands.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X),FT81x.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_IL3820),il3820.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_JD79653A),jd79653a.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_UC8151D),uc8151d.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_RA8875),ra8875.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_GC9A01),gc9a01.o) - -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_PROTOCOL_SPI),disp_spi.o) diff --git a/lvgl_touch/CMakeLists.txt b/lvgl_touch/CMakeLists.txt deleted file mode 100644 index b8b1c68..0000000 --- a/lvgl_touch/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -if(ESP_PLATFORM) - -set(SOURCES "touch_driver.c") - -# Include only the source file of the selected -# display controller. -if(CONFIG_LV_TOUCH_CONTROLLER_XPT2046) - list(APPEND SOURCES "xpt2046.c") -elseif(CONFIG_LV_TOUCH_CONTROLLER_FT6X06) - list(APPEND SOURCES "ft6x36.c") -elseif(CONFIG_LV_TOUCH_CONTROLLER_STMPE610) - list(APPEND SOURCES "stmpe610") -elseif(CONFIG_LV_TOUCH_CONTROLLER_ADCRAW) - list(APPEND SOURCES "adcraw.c") -elseif(CONFIG_LV_TOUCH_CONTROLLER_FT81X) - list(APPEND SOURCES "FT81x.c") -elseif(CONFIG_LV_TOUCH_CONTROLLER_RA8875) - list(APPEND SOURCES "ra8875_touch.c") -endif() - -if(CONFIG_LV_TOUCH_DRIVER_PROTOCOL_SPI) - list(APPEND SOURCES "tp_spi.c") -elseif(CONFIG_LV_TOUCH_DRIVER_PROTOCOL_I2C) - list(APPEND SOURCES "tp_i2c.c") -endif() - -# Print the included source files -message("SOURCES contents: " "${SOURCES}") - -idf_component_register(SRCS ${SOURCES} - INCLUDE_DIRS . - REQUIRES lvgl) - -endif() diff --git a/lvgl_touch/component.mk b/lvgl_touch/component.mk deleted file mode 100644 index 5b7c3ee..0000000 --- a/lvgl_touch/component.mk +++ /dev/null @@ -1,4 +0,0 @@ -# Touch drivers - -COMPONENT_SRCDIRS := . -COMPONENT_ADD_INCLUDEDIRS := . From 28d9fe7641758a3e4201c444e64d5cb2f0b3375b Mon Sep 17 00:00:00 2001 From: Tomas Rezucha Date: Tue, 23 Feb 2021 20:27:56 +0100 Subject: [PATCH 2/3] Fix Kconfig name --- KConfig | 2 -- Kconfig | 2 ++ component.mk | 11 +++++------ 3 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 KConfig create mode 100644 Kconfig diff --git a/KConfig b/KConfig deleted file mode 100644 index 80509c6..0000000 --- a/KConfig +++ /dev/null @@ -1,2 +0,0 @@ -rsource "lvgl_tft/Kconfig" -rsource "lvgl_touch/KConfig" diff --git a/Kconfig b/Kconfig new file mode 100644 index 0000000..ae11925 --- /dev/null +++ b/Kconfig @@ -0,0 +1,2 @@ +rsource "lvgl_tft/Kconfig" +rsource "lvgl_touch/Kconfig" diff --git a/component.mk b/component.mk index 1ce9d8f..dbd1105 100644 --- a/component.mk +++ b/component.mk @@ -1,7 +1,7 @@ # LVGL ESP32 drivers -# Compile everything in this folder unconditionally -COMPONENT_SRCDIRS := . +# Define sources and include dirs +COMPONENT_SRCDIRS := . lvgl_tft lvgl_touch COMPONENT_ADD_INCLUDEDIRS := . # LVGL is supposed to be used as a ESP-IDF component @@ -11,10 +11,9 @@ CFLAGS += -DLV_LVGL_H_INCLUDE_SIMPLE # TFT display drivers COMPONENT_ADD_INCLUDEDIRS += lvgl_tft -COMPONENT_OBJS := lvgl_tft/disp_driver.o $(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341),lvgl_tft/ili9341.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9481),lvgl_tft/ili9491.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9481),lvgl_tft/ili9481.o) $(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9486),lvgl_tft/ili9486.o) $(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9488),lvgl_tft/ili9488.o) $(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7789),lvgl_tft/st7789.o) @@ -29,7 +28,7 @@ $(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_IL3820),lvgl_tft/il382 $(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_JD79653A),lvgl_tft/jd79653a.o) $(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_UC8151D),lvgl_tft/uc8151d.o) $(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_RA8875),lvgl_tft/ra8875.o) -$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_GC9A01),lvgl_tft/gc9a01.o) +$(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_CONTROLLER_GC9A01),lvgl_tft/GC9A01.o) $(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_PROTOCOL_SPI),lvgl_tft/disp_spi.o) @@ -37,7 +36,7 @@ $(call compile_only_if,$(CONFIG_LV_TFT_DISPLAY_PROTOCOL_SPI),lvgl_tft/disp_spi.o COMPONENT_ADD_INCLUDEDIRS += lvgl_touch $(call compile_only_if,$(CONFIG_LV_TOUCH_CONTROLLER),lvgl_touch/touch_driver.o) -$(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_XPT2046T)), lvgl_touch/xpt2046.o) +$(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_XPT2046)), lvgl_touch/xpt2046.o) $(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_FT6X06)), lvgl_touch/ft6x36.o) $(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_STMPE610)), lvgl_touch/stmpe610.o) $(call compile_only_if,$(and $(CONFIG_LV_TOUCH_CONTROLLER),$(CONFIG_LV_TOUCH_CONTROLLER_ADCRAW)), lvgl_touch/adcraw.o) From 503ecb2b1eb3d7e335a14ce1c23afbfec99c666d Mon Sep 17 00:00:00 2001 From: Tomas Rezucha Date: Tue, 23 Feb 2021 20:28:27 +0100 Subject: [PATCH 3/3] Move Simple include definition to ESP32-drivers --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6efcbc4..d86bd33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,8 @@ endif() idf_component_register(SRCS ${SOURCES} INCLUDE_DIRS ${LVGL_INCLUDE_DIRS} REQUIRES lvgl) + +target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_LVGL_H_INCLUDE_SIMPLE") else() message(FATAL_ERROR "LVGL ESP32 drivers: ESP_PLATFORM is not defined. Try reinstalling ESP-IDF.")