diff --git a/components/led/lightbulb_driver/CHANGELOG.md b/components/led/lightbulb_driver/CHANGELOG.md index 3345e7585..0ca4577ce 100644 --- a/components/led/lightbulb_driver/CHANGELOG.md +++ b/components/led/lightbulb_driver/CHANGELOG.md @@ -1,5 +1,11 @@ # ChangeLog +## v1.1.2 - 2024-02-05 + +### Bug Fixes: + +* fix(lightbulb): incorrect type. + ## v1.1.1 - 2024-02-04 ### Bug Fixes: diff --git a/components/led/lightbulb_driver/drivers/sm2x35egh/sm2x35egh.c b/components/led/lightbulb_driver/drivers/sm2x35egh/sm2x35egh.c index 512ea93e0..9e84355ee 100644 --- a/components/led/lightbulb_driver/drivers/sm2x35egh/sm2x35egh.c +++ b/components/led/lightbulb_driver/drivers/sm2x35egh/sm2x35egh.c @@ -201,11 +201,11 @@ sm2x35egh_rgb_current_t sm2235egh_rgb_current_mapping(int current_mA) return (sm2x35egh_rgb_current_t)((current_mA - 4) / 4); } -sm2x35egh_rgb_current_t sm2235egh_cw_current_mapping(int current_mA) +sm2x35egh_cw_current_t sm2235egh_cw_current_mapping(int current_mA) { DRIVER_CHECK((current_mA >= 5) && (current_mA <= 80) && (!(current_mA % 5)), "The current value is incorrect and cannot be mapped.", return SM2235EGH_CW_CURRENT_MAX); - return (sm2x35egh_rgb_current_t)((current_mA - 5) / 5); + return (sm2x35egh_cw_current_t)((current_mA - 5) / 5); } sm2x35egh_rgb_current_t sm2335egh_rgb_current_mapping(int current_mA) @@ -215,11 +215,11 @@ sm2x35egh_rgb_current_t sm2335egh_rgb_current_mapping(int current_mA) return (sm2x35egh_rgb_current_t)((current_mA - 10) / 10); } -sm2x35egh_rgb_current_t sm2335egh_cw_current_mapping(int current_mA) +sm2x35egh_cw_current_t sm2335egh_cw_current_mapping(int current_mA) { DRIVER_CHECK((current_mA >= 5) && (current_mA <= 80) && (!(current_mA % 5)), "The current value is incorrect and cannot be mapped.", return SM2335EGH_CW_CURRENT_MAX); - return (sm2x35egh_rgb_current_t)((current_mA - 5) / 5); + return (sm2x35egh_cw_current_t)((current_mA - 5) / 5); } esp_err_t sm2x35egh_init(driver_sm2x35egh_t *config, void(*hook_func)(void *)) diff --git a/components/led/lightbulb_driver/drivers/sm2x35egh/sm2x35egh.h b/components/led/lightbulb_driver/drivers/sm2x35egh/sm2x35egh.h index 89b933c3b..7db4d8068 100644 --- a/components/led/lightbulb_driver/drivers/sm2x35egh/sm2x35egh.h +++ b/components/led/lightbulb_driver/drivers/sm2x35egh/sm2x35egh.h @@ -221,9 +221,9 @@ sm2x35egh_rgb_current_t sm2235egh_rgb_current_mapping(int current_mA); * @brief Convert the cw channel current value into the enumeration value required by the driver * * @param current_mA Drive current value, in milliamps, ranges from 5~80mA, and can be evenly divided by 5 - * @return sm2x35egh_rgb_current_t + * @return sm2x35egh_cw_current_t */ -sm2x35egh_rgb_current_t sm2235egh_cw_current_mapping(int current_mA); +sm2x35egh_cw_current_t sm2235egh_cw_current_mapping(int current_mA); /** * @brief Convert the rgb channel current value into the enumeration value required by the driver @@ -237,6 +237,6 @@ sm2x35egh_rgb_current_t sm2335egh_rgb_current_mapping(int current_mA); * @brief Convert the cw channel current value into the enumeration value required by the driver * * @param current_mA Drive current value, in milliamps, ranges from 5~80mA, and can be evenly divided by 5 - * @return sm2x35egh_rgb_current_t + * @return sm2x35egh_cw_current_t */ -sm2x35egh_rgb_current_t sm2335egh_cw_current_mapping(int current_mA); +sm2x35egh_cw_current_t sm2335egh_cw_current_mapping(int current_mA); diff --git a/components/led/lightbulb_driver/idf_component.yml b/components/led/lightbulb_driver/idf_component.yml index 67a58d141..2261a538f 100644 --- a/components/led/lightbulb_driver/idf_component.yml +++ b/components/led/lightbulb_driver/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.1.1" +version: "1.1.2" 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: diff --git a/components/led/lightbulb_driver/include/lightbulb.h b/components/led/lightbulb_driver/include/lightbulb.h index 3bffcc93e..14604cd40 100644 --- a/components/led/lightbulb_driver/include/lightbulb.h +++ b/components/led/lightbulb_driver/include/lightbulb.h @@ -14,6 +14,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifdef CONFIG_ENABLE_PWM_DRIVER #include "pwm.h" #endif @@ -42,10 +46,6 @@ #include "kp18058.h" #endif -#ifdef __cplusplus -extern "C" { -#endif - /** * @brief Supported drivers *