You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1019 B

4 years ago
#ifndef TPC_0D0A_H
#define TPC_0D0A_H
#include "tpc_x.h"
///-----------------------------------------------------------------------------------------
//#define D_s_SSTR_0D0A_len 64 //str类的协议需要长度大一些,容易bug的地方,限制为接收64bytes的数据
#if 0
#define FLAG_NONE 0
#define FLAG_DISCARD 1
#define FLAG_CCID 2
#define FLAG_CIP 3
typedef struct _s_PC1_0D0A_
{//8byte
vU8 reg;
// vU8 sub_num; //接收到的数目注意数据长度的范围
vU8 head; //接收标志头标志
vU8 cashe[4];
//vU8 filter1;
//vU8 filter2;
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的第一位是 长度 //协议缓冲
// U8 pro[16]; ///解析协议用
}TS_Handle_0d0a;
#endif
extern void L1_s2b_0d0a(struct _tp_handler_x *p); //reentrant;
#endif