📄 pdu_chris.h
字号:
#ifndef PDU_chris_H
#define PDU_chris_H
struct TP_UDstruct
{
u08 SCAddressLength; //08
u08 SCAddressType; //91
u08 SCAddressValue[14]; //683108701305F0
u08 FirstOctet; //24
u08 SrcAddressLength; //0D
u08 SrcAddressType; //91
u08 SrcAddressValue[14];//683197185724F3
u08 TP_PID; //00
u08 TP_DCS; //08
//SCTSType TP_SCTS;
u08 year[2]; //60
u08 month[2]; //60
u08 day[2]; //72
u08 hour[2]; //22
u08 minute[2]; //32
u08 second[2]; //25
u08 timezone[2]; //23
u08 TP_UDL; //0C
u08 TP_UD[30];
};
//pSrc point to the orignal register
//pDst point to the destination register, which the coverted Hex stored to.
//nSrcLength indicate how many orignal byte to covert to Hex
void charToHex(u08 *pSrc, u08 *pDst, u08 nSrcLength);
//get all the PDUdata which *p point to ,the *p is available in u08 *RowAddress[6];
//and store each member to corresponding register in the PDU struct
void GetAllData03(u08 *p);
//SrcAddress is the source string,DstAddress is the destication string
u08 PDUstrcmp(u08 *SrcAddress,u08 *DstAddress);
//compare the destination string with "AT"string
u08 checkAT(u08 *address);
//compare the destination string with "OK"string
u08 checkOK(u08 *address);
//compare the destination string with "ERROR"string
u08 checkERROR(u08 *address);
//get the row count and the address of each row in the received buffer
//buffer point to uartRxData(the uart received PDUbuffer)
//RowAddress is the pointer pointed to pointer group
//RowCount is the pointer pointed to RowCount
void getRowReference(u08 *buffer,u08 **RowAddress_p,u08 *RowCount_p );
//RowNum: 0-x (x=1,2,3...)
//buffer: point to uartRxData(the uart received PDUbuffer)
//RowNum: the row you want to get its address
//Bug!\: this function will run forever when RowNum exceed the actual row number
//buffer: GSM送回的没处理过的数据首地址
//RowNum: 要传回的行的首地址
u08 *getRowAddress(u08 *buffer,u08 RowNum );
//this function is attached to exterior interrupt(GSM /RING0 pin),
//triger in falling edge
void newSMSIndicator(void);
//new message process,store all the orignal dataS to
//corresponding register in the PDUstruct.
void newSMSProcess(void);
#endif
//@}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -