喷淋器 P0 功能实现

This commit is contained in:
2026-09-09 15:03:50 +08:00
parent b880b2e62b
commit 866b522c59
30 changed files with 3773 additions and 25 deletions
+61
View File
@@ -0,0 +1,61 @@
/******************************************************************************
* @file app_function.h
* @brief 功能总装:按键动作 + DP 同步(配对/OTA 只在任务上下文落地)
* @author cyWu <1917507415@qq.com>
* @date 2026.09.09
* @version V1.0.0
******************************************************************************/
#ifndef __APP_FUNCTION_H__
#define __APP_FUNCTION_H__
#include <stdint.h>
/**
* @brief 初始化功能模块状态
* @return 无
*/
void app_function_init(void);
/**
* @brief 同步 DPDP1=喷淋作业态),每个 20ms 业务 tick 调用
* @note 上报的是**作业态**(整轮含间隔等待为 1),不是某一只脚的瞬时电平
* @return 无
*/
void app_function_poll(void);
/**
* @brief 任务上下文周期处理(usr_timer_loop 500ms
* @note 写 VM / 配对 / OTA 只准在此落地,禁止放进 20ms ISR
* @return 无
*/
void app_function_loop(void);
/**
* @brief 业务层喷淋键短按回调(key_manager 触发):空闲开一轮 / 作业中停
* @return 无
*/
void usr_on_key_short(void);
/**
* @brief 业务层"配网键按住满 5s"回调(key_manager 触发,20ms 中断上下文)
* @note 只切红灯快闪提示(绿灯不受影响),不清绑定
* @return 无
*/
void usr_on_key_pair_hint(void);
/**
* @brief 业务层"配网键按满 5s 后松手"回调(key_manager 触发,20ms 中断上下文)
* @note 只置标志:清绑定要写 VM,由 app_function_loop 在任务上下文执行
* @return 无
*/
void usr_on_key_pair_start(void);
/**
* @brief 业务层"配网键按住满 12s"回调(key_manager 触发,20ms 中断上下文)
* @note 只置标志:usr_app_ota_init 由 app_function_loop 在任务上下文执行
* @return 无
*/
void usr_on_key_ota_start(void);
#endif /* __APP_FUNCTION_H__ */