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)
2
2
3
3
file (GLOB SOURCES *.c )
4
4
set (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" )
6
6
7
7
#@todo add SimleInclude macro here
8
8
@@ -79,6 +79,11 @@ if(CONFIG_LV_TOUCH_CONTROLLER)
79
79
endif ()
80
80
endif ()
81
81
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
+
82
87
idf_component_register (SRCS ${SOURCES}
83
88
INCLUDE_DIRS ${LVGL_INCLUDE_DIRS}
84
89
REQUIRES lvgl )
Original file line number Diff line number Diff line change 19
19
/*********************
20
20
* DEFINES
21
21
*********************/
22
+ #if CONFIG_LV_ENABLE_BACKLIGHT_CONTROL
22
23
#define DISP_PIN_BCKL CONFIG_LV_DISP_PIN_BCKL
23
-
24
+ #endif
24
25
25
26
/**********************
26
27
* GLOBAL PROTOTYPES
You can’t perform that action at this time.
0 commit comments