功耗减低到900uA,还有优化空间,还要陈杰明那边支持一下

This commit is contained in:
2026-08-25 11:16:54 +08:00
parent e0f5da6f39
commit d5ec6ecde0
8 changed files with 290 additions and 72 deletions
+13 -5
View File
@@ -1,11 +1,12 @@
/******************************************************************************
* @file app_led.h
* @brief CBC2 灯效优先级:充电 > 配对 > 软关 > 低电 > 切模式闪 > 绿灯
* @brief CBC2 灯效优先级:充电 > 配对 > 软关 > 低电 > 切模式闪 > 开机绿灯提示后灭
* @author cyWu <1917507415@qq.com>
* @date 2026.08.21
* @version V1.0.0
* @date 2026.08.25
* @version V1.1.0
* @history
* - V1.0.0, 2026.08.21, cyWu, 首次发布
* - V1.1.0, 2026.08.25, cyWu, 开机绿灯只提示几秒,避免待机常亮耗电
******************************************************************************/
#ifndef __APP_LED_H__
@@ -33,11 +34,12 @@ typedef struct {
AppLed_Ret_t app_led_init(void);
/**
* @brief 1ms 按优先级刷新灯
* @brief 按优先级刷新灯
* @param ctx 充电/配对/开关/低电状态,不可为空
* @param dt 距上次调用的毫秒数
* @return 无
*/
void app_led_tick_1ms(const AppLedCtx_t *ctx);
void app_led_tick_1ms(const AppLedCtx_t *ctx, uint16_t dt);
/**
* @brief 请求切模式绿灯闪两下
@@ -45,6 +47,12 @@ void app_led_tick_1ms(const AppLedCtx_t *ctx);
*/
void app_led_request_mode_blink(void);
/**
* @brief 重新亮几秒开机绿灯
* @return 无
*/
void app_led_hint_power_on(void);
/**
* @brief 播放一次性配对结果灯
* @param ok 1=成功常绿,0=失败红绿交替