Files
wuchuyuan e324ebd99b 精简 usr_app 架构:去掉关机/休眠死代码,按键复用 key.c 状态机,ISR 重活统一延后到任务上下文
Type-C 长供电、上电即工作、无软关机,删除 app_boot/app_power 及 DP0 开关相关逻辑,
去掉空占位 app_fan_run 和无效的 usr_timer_pick_mode/rearm(数码管 4ms 扫描已 priority=1,
系统本来就不会进低功耗)。按键 5s 配对 / 12s OTA 改走 key.c 长按分级,去掉自计时与 1~5s 死区。
新增 app_defer,NVM/配对/OTA 只在 ISR 置位、在 500ms 任务上下文落地,避免再在 usr_timer 里写 flash。
规格书与注释同步精简。
2026-08-31 17:57:52 +08:00

34 lines
907 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/******************************************************************************
* @file app_fan.h
* @brief CBR3 风扇档位:0/1/2/3 → 0%/50%/75%/100%
* @author cyWu <1917507415@qq.com>
* @date 2026.08.31
* @version V1.1.0,删除 app_fan_run(从未真正做过软爬坡的空占位)
******************************************************************************/
#ifndef __APP_FAN_H__
#define __APP_FAN_H__
#include <stdint.h>
/**
* @brief 初始化风扇(档位 0PWM 关)
* @return 无
*/
void app_fan_init(void);
/**
* @brief 设置档位并立即生效(P0 无软爬坡)
* @param gear 0=关,1=50%2=75%3=100%>3 钳位到 3
* @return 无
*/
void app_fan_set_gear(uint8_t gear);
/**
* @brief 查询当前真实档位(DP2 必须等于它,通风停段时为 0)
* @return 0~3
*/
uint8_t app_fan_get_gear(void);
#endif /* __APP_FAN_H__ */