diff --git a/examples/lighting-app/bouffalolab/bl602/src/LEDWidget.cpp b/examples/lighting-app/bouffalolab/bl602/src/LEDWidget.cpp index 79f9076881160c..5e596ca757e650 100644 --- a/examples/lighting-app/bouffalolab/bl602/src/LEDWidget.cpp +++ b/examples/lighting-app/bouffalolab/bl602/src/LEDWidget.cpp @@ -141,7 +141,7 @@ bool LEDWidget::IsTurnedOn() void LEDWidget::SetColor(uint8_t Hue, uint8_t Saturation) { uint8_t red, green, blue; - uint8_t brightness = mState ? mDefaultOnBrightness : 0; + uint8_t brightness = mDefaultOnBrightness; mHue = static_cast(Hue) * 360 / 254; // mHue [0, 360] mSaturation = static_cast(Saturation) * 100 / 254; // mSaturation [0 , 100] diff --git a/examples/platform/bouffalolab/bl602/InitPlatform.cpp b/examples/platform/bouffalolab/bl602/InitPlatform.cpp index 674c200b3be176..664a874fd123a8 100644 --- a/examples/platform/bouffalolab/bl602/InitPlatform.cpp +++ b/examples/platform/bouffalolab/bl602/InitPlatform.cpp @@ -282,12 +282,7 @@ void InitPlatform(void) { bl_sys_init(); - uint32_t fdt = 0, offset = 0; - if (0 == get_dts_addr("gpio", &fdt, &offset)) - { - hal_gpio_init_from_dts(fdt, offset); - fdt_button_module_init((const void *) fdt, (int) offset); - } + hal_button_module_init(8, 1000, 4800, 5000); Platform_Light_Init(); aos_register_event_filter(EV_KEY, event_cb_key_event, NULL); } diff --git a/third_party/bouffalolab/bl602_sdk/repo b/third_party/bouffalolab/bl602_sdk/repo index 8af0351c4e6123..244f48b1c5d1c1 160000 --- a/third_party/bouffalolab/bl602_sdk/repo +++ b/third_party/bouffalolab/bl602_sdk/repo @@ -1 +1 @@ -Subproject commit 8af0351c4e6123e2e396e869b5537a18593a31d7 +Subproject commit 244f48b1c5d1c1f54cf1d92906ec7e3c6bf53b1a