File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ if(ESP_PLATFORM)
22
33file (GLOB SOURCES *.c)
44set (LVGL_INCLUDE_DIRS . lvgl_tft)
5- list (APPEND SOURCES "lvgl_tft/disp_driver.c" "lvgl_tft/esp_lcd_backlight.c" )
5+ list (APPEND SOURCES "lvgl_tft/disp_driver.c" )
66
77#@todo add SimleInclude macro here
88
@@ -79,6 +79,11 @@ if(CONFIG_LV_TOUCH_CONTROLLER)
7979 endif ()
8080endif ()
8181
82+ # Add backlight control to compilation only if it is selected in menuconfig
83+ if (CONFIG_LV_ENABLE_BACKLIGHT_CONTROL)
84+ list (APPEND SOURCES "lvgl_tft/esp_lcd_backlight.c" )
85+ endif ()
86+
8287idf_component_register(SRCS ${SOURCES}
8388 INCLUDE_DIRS ${LVGL_INCLUDE_DIRS}
8489 REQUIRES lvgl)
Original file line number Diff line number Diff line change 1919/*********************
2020 * DEFINES
2121 *********************/
22+ #if CONFIG_LV_ENABLE_BACKLIGHT_CONTROL
2223#define DISP_PIN_BCKL CONFIG_LV_DISP_PIN_BCKL
23-
24+ #endif
2425
2526/**********************
2627 * GLOBAL PROTOTYPES
You can’t perform that action at this time.
0 commit comments