feat: 完成弹力魔盒初版固件
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
* @history
|
||||
* - V1.0.0, 2026.08.25, cyWu, 首次发布,实现 DP0 开关、自动玩法、手动点动与按键动作
|
||||
*
|
||||
* @note 本模块决定“电机现在该不该转、转哪种”,会读 app_power/app_pair 的
|
||||
* 状态作为阻塞条件(充电中/深睡中/配对中都不能转),也会触发
|
||||
* @note 本模块决定“电机现在该不该转、转哪种”,会读电源与 OTA 状态作为
|
||||
* 阻塞条件;配对是开机状态上的附加会话,不阻塞运动或按键。也会触发
|
||||
* app_led 的一次性提示灯(切模式闪、开机绿灯),但不会被它们反向依赖。
|
||||
******************************************************************************/
|
||||
|
||||
@@ -23,13 +23,25 @@
|
||||
*/
|
||||
void app_function_init(void);
|
||||
|
||||
/** CBC3 DP0 写入:排队到业务节拍统一执行。 */
|
||||
void app_function_dp_power_write(uint8_t enable);
|
||||
|
||||
/** CBC3 DP1 写入:支持重复下发当前模式时停止。 */
|
||||
void app_function_dp_play_write(uint8_t mode);
|
||||
|
||||
/**
|
||||
* @brief DP2 写入钩子:仅记录第 1 字节,真正执行在 app_function_poll
|
||||
* @param cmd 0=空闲,1=顺时针,2=逆时针,3=停
|
||||
* @param cmd 0=忽略,1=原地右转,2=原地左转
|
||||
* @return 无
|
||||
*/
|
||||
void app_function_dp_hand_write(uint8_t cmd);
|
||||
|
||||
/** CBC3 DP6 震动开机开关。 */
|
||||
void app_function_set_shake_wake(uint8_t enable);
|
||||
|
||||
/** 勿扰时段是否正在生效;生效时屏蔽震动开机。 */
|
||||
void app_function_set_no_disturb(uint8_t enable);
|
||||
|
||||
/**
|
||||
* @brief 跟随 APP 下发的 DP0/DP1,并处理 DP2 手动点动,每个业务 tick 调用一次
|
||||
* @return 无
|
||||
@@ -75,7 +87,7 @@ uint8_t app_function_is_hand_busy(void);
|
||||
|
||||
/**
|
||||
* @brief 查询当前自动玩法编号
|
||||
* @return 0=停转,1~6=对应玩法
|
||||
* @return 0=停转,1~5=对应玩法
|
||||
*/
|
||||
uint8_t app_function_play_mode(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user