From 4d3dd251a1b13f27b4febc84d1acd297c2a6372a Mon Sep 17 00:00:00 2001 From: Chen Chen Date: Tue, 16 Sep 2025 19:22:49 +0800 Subject: [PATCH] feat(lightbulb_driver): Update driver dependency --- components/led/lightbulb_driver/CHANGELOG.md | 6 ++++++ components/led/lightbulb_driver/CMakeLists.txt | 13 +++++++++++-- components/led/lightbulb_driver/Kconfig | 2 +- components/led/lightbulb_driver/idf_component.yml | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/components/led/lightbulb_driver/CHANGELOG.md b/components/led/lightbulb_driver/CHANGELOG.md index 27e37575b..7b26ebf7e 100644 --- a/components/led/lightbulb_driver/CHANGELOG.md +++ b/components/led/lightbulb_driver/CHANGELOG.md @@ -1,5 +1,11 @@ # ChangeLog +## v1.11.0 - 2025-09-17 + +### Refactor: + +* Clean up the component dependency, don't depend on the `driver` component directly + ## v1.10.1 - 2025-09-03 ### Bug Fix: diff --git a/components/led/lightbulb_driver/CMakeLists.txt b/components/led/lightbulb_driver/CMakeLists.txt index b7dfb14b5..6e19cef5c 100644 --- a/components/led/lightbulb_driver/CMakeLists.txt +++ b/components/led/lightbulb_driver/CMakeLists.txt @@ -3,10 +3,18 @@ set(srcs "src/hal_driver.c" "src/lighting.c" ) -set(priv_req nvs_flash driver esp_timer) +set(priv_req nvs_flash esp_timer) +set(public_req) if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.2.6") -list(APPEND priv_req "esp_driver_i2c") + list(APPEND priv_req "esp_driver_i2c") +endif() + +if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.3") + list(APPEND public_req "esp_driver_gpio") + list(APPEND priv_req "esp_driver_gptimer" "esp_driver_ledc" "esp_driver_spi") +else() + list(APPEND priv_req "driver") endif() set(incs "include" "drivers/common/utils/") @@ -72,6 +80,7 @@ idf_component_register(SRCS ${srcs} INCLUDE_DIRS ${incs} PRIV_INCLUDE_DIRS "src/priv_include" PRIV_REQUIRES ${priv_req} + REQUIRES ${public_req} ) include(package_manager) diff --git a/components/led/lightbulb_driver/Kconfig b/components/led/lightbulb_driver/Kconfig index 3af9ad8f0..c941cbc54 100644 --- a/components/led/lightbulb_driver/Kconfig +++ b/components/led/lightbulb_driver/Kconfig @@ -69,7 +69,7 @@ menu "LightBulb Driver Config" config LB_ENABLE_NEW_IIC_DRIVER depends on ESP_IDF_VERSION >= 5.2.6 bool "Enable new I2C driver" - default "n" + default "y" help Enable new I2C driver. diff --git a/components/led/lightbulb_driver/idf_component.yml b/components/led/lightbulb_driver/idf_component.yml index 1a49bb144..d5cb8e742 100644 --- a/components/led/lightbulb_driver/idf_component.yml +++ b/components/led/lightbulb_driver/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.10.1" +version: "1.11.0" description: Provide multiple dimming driver solutions to easily build lightbulb applications url: https://github.com/espressif/esp-iot-solution/tree/master/components/led/lightbulb_driver dependencies: