Files
wuchuyuan 0dd65e1552 1、喷淋器 P1/P2功能实现
2、红灯按连接态慢闪
2026-09-09 19:57:00 +08:00

50 lines
1.7 KiB
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_arbiter.h
* @brief CBR2 喷淋仲裁(规格书第 13 章):手动 > 计划队列 > 联动
* @author cyWu <1917507415@qq.com>
* @date 2026.09.09
* @version V1.0.0,首次发布
*
* @note 与加热垫独立 owner 状态机不同:本机 owner 单一事实源在
* app_spray 轮上下文(APP_SPRAY_OWNER_*),本模块负责
* 「手动作废联动」转调与「轮结束边沿收口」分发:
* 计划轮结束 → 单次自毁 + 出队下一条
* 队列非空 → 立刻 kick(不插队当前轮,只排队续跑)
* 否则 → 联动立刻补判(12.4:计划结束后接着循环)
******************************************************************************/
#ifndef __APP_ARBITER_H__
#define __APP_ARBITER_H__
#include <stdint.h>
/**
* @brief 初始化仲裁器
* @return 无
*/
void app_arbiter_init(void);
/**
* @brief 消费轮结束事件并收口(500ms 任务上下文,usr_timer_loop 调用)
* @note 位置须在 app_linkage_run / app_timer_run 之前:收口里补判的
* 联动 / 出队的计划当拍即生效
* @return 无
*/
void app_arbiter_poll(void);
/**
* @brief 手动介入:作废联动轮(PB1 停 / DP1=0 / DP7 抢权时调用)
* @return 无
*/
void app_arbiter_manual_intervene(void);
/**
* @brief 轮结束边沿收口(500ms 任务上下文,由 app_function_loop 消费事件调用)
* @param owner 结束轮来源(AppSprayOwner_t
* @param slot 结束轮槽位(owner==PLAN 时有效)
* @return 无
*/
void app_arbiter_on_round_done(uint8_t owner, uint8_t slot);
#endif /* __APP_ARBITER_H__ */