update template

This commit is contained in:
2026-02-18 17:44:38 +08:00
parent d324d5f92a
commit 7419dec1b5
14 changed files with 1076 additions and 281 deletions

View File

@@ -21,7 +21,7 @@
* 接收命令帧格式:
* @code
* [0] HEADER = 0xD5 // 包头标识
* [1] BOARD_TYPE = 0x03 // 板卡类型标识
* [1] BOARD_TYPE = 0x01 // 板卡类型标识
* [2] LEN = 数据区字节数 // 有效载荷长度
* [3..(3+LEN-1)] 数据 // 命令数据
* [last] CRC // 校验码从索引1累加到len-2的低8位
@@ -77,5 +77,24 @@ void command_process(void);
*/
void handle_command(const uint8_t *cmd, uint8_t len);
/**
* @brief 执行命令(简化版)
* @details 根据命令字符串直接构造命令帧并执行,无需手动构造协议帧
* @param cmd_str 命令字符串(如"M730S0T1000"、"M731S100"等)
* @note 简化的测试函数自动处理协议帧构造、CRC计算和命令执行
* @ingroup Command
*/
void command_execute(const char *cmd_str);
/**
* @brief M737命令投光结束回调函数
* @details 当定时器结束时调用此函数向等待中的M737命令发送OK响应
* @param none
* @note 此函数由定时器中断调用,不应直接调用
* @ingroup Command
*/
void command_m737_timer_finished_callback(void);
/** @} */ // end of Command group
#endif // COMMAND_H