1
0

protocol.h 797 B

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