| 1234567891011121314151617181920212223242526 |
- /**
- @copyright None
- @file protocol.h
- @author Comment Vivre
- @date 2025-12-23
- @brief None
- */
- #ifndef __PROTOCOL_H_
- #define __PROTOCOL_H_
- #include <FU65_72.h>
- // 串口通讯协议定义 << 匿名协议
- #define FRAME_HEADER 0xAB // 帧头
- #define MAX_FRAME_LEN 0x40 // 最大数据帧长度
- #define DATA_OFFSET 0x06 // 头(1B) + 地址(2B) + 功能码(1B) + 长度(2B)
- #define CRC_OFFSET 0x02 // 校验字(2B)
- extern bool RecMessageFalg;
- extern uint8_t xdata DebugDat[MAX_FRAME_LEN];
- extern uint8_t RecvBuffer[MAX_FRAME_LEN];
- void Dabug_Data_Update(void);
- #endif
|