esp_lcd_backlight: do not build if not enabled
Signed-off-by: Rajssss <sssraj.sssraj@gmail.com>
This commit is contained in:
parent
5d4334a5b9
commit
35a005a47c
|
@ -2,7 +2,7 @@ if(ESP_PLATFORM)
|
||||||
|
|
||||||
file(GLOB SOURCES *.c)
|
file(GLOB SOURCES *.c)
|
||||||
set(LVGL_INCLUDE_DIRS . lvgl_tft)
|
set(LVGL_INCLUDE_DIRS . lvgl_tft)
|
||||||
list(APPEND SOURCES "lvgl_tft/disp_driver.c" "lvgl_tft/esp_lcd_backlight.c")
|
list(APPEND SOURCES "lvgl_tft/disp_driver.c")
|
||||||
|
|
||||||
#@todo add SimleInclude macro here
|
#@todo add SimleInclude macro here
|
||||||
|
|
||||||
|
@ -79,6 +79,11 @@ if(CONFIG_LV_TOUCH_CONTROLLER)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Add backlight control to compilation only if it is selected in menuconfig
|
||||||
|
if(CONFIG_LV_ENABLE_BACKLIGHT_CONTROL)
|
||||||
|
list(APPEND SOURCES "lvgl_tft/esp_lcd_backlight.c")
|
||||||
|
endif()
|
||||||
|
|
||||||
idf_component_register(SRCS ${SOURCES}
|
idf_component_register(SRCS ${SOURCES}
|
||||||
INCLUDE_DIRS ${LVGL_INCLUDE_DIRS}
|
INCLUDE_DIRS ${LVGL_INCLUDE_DIRS}
|
||||||
REQUIRES lvgl)
|
REQUIRES lvgl)
|
||||||
|
|
|
@ -19,8 +19,9 @@
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
|
#if CONFIG_LV_ENABLE_BACKLIGHT_CONTROL
|
||||||
#define DISP_PIN_BCKL CONFIG_LV_DISP_PIN_BCKL
|
#define DISP_PIN_BCKL CONFIG_LV_DISP_PIN_BCKL
|
||||||
|
#endif
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* GLOBAL PROTOTYPES
|
* GLOBAL PROTOTYPES
|
||||||
|
|
Loading…
Reference in a new issue