Files
JBao_Temp_Humi_Fan_FW/apps/usr_app/app_fan.h
T
wuchuyuan 5cc7e9dbd6 接入温湿度风扇产品固件(仲裁/条件/定时/显示),并补齐规格书与外设驱动
新增 usr_app 产品逻辑:手动>定时>条件仲裁、条件控温湿、定时任务、数码管显示、
按键/LED、风扇档位、NVM 掉电恢复、配对与开关机,上电按规格恢复上次状态。
新增 usr_periph:AHT20、CT1642、板级引脚与硬件封装;见宝协议 cond_config
改为 7 字节编解码,并接入产品 DP。
补充《温湿度风扇_固件需求规格书》,工程加入对应源文件。
.gitignore 忽略 WorkBuddy/Cursor 本地会话
2026-08-31 15:17:27 +08:00

43 lines
1.0 KiB
C
Raw 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.29
* @version V1.0.0
* @history
* - V1.0.0, 2026.08.29, cyWu, 首次发布
******************************************************************************/
#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);
/**
* @brief 业务节拍(P0 无动作,保留接口供 P1 爬坡)
* @param dt 距上次调用的毫秒数
* @return 无
*/
void app_fan_run(uint16_t dt);
#endif /* __APP_FAN_H__ */