#ifndef TPC_AT0D0A_H #define TPC_AT0D0A_H #include "tpc_x.h" ///----------------------------------------------------------------------------------------- #define D_s_SSTR_0D0A_len 128 //str类的协议需要长度大一些,容易bug的地方,限制为接收64bytes的数据 typedef struct _s_PC1_0D0A_ {//8byte vU8 reg; vU8 head; //接收标志头标志 vU8 cashe[4]; vU8 num; //接收到的数据的计数, 随着数据接收而变化注意数据长度的范围 vU8 ok; //接收协议ok标志 vU8 max; //接收到的数目的最大值 vU8 __buf[D_s_SSTR_0D0A_len+1];//buffer vU8 buf[D_s_SSTR_0D0A_len+1];//array的第一位是 长度 //协议缓冲 vU8 setflag; //读取串口过程中设置标志 }TS_Handle_0d0a; extern void L1_s2b_0d0a(struct _s_PC1_0D0A_ *p);// reentrant; #endif