| | |
| | | |
| | | |
| | | #ifndef __SLP_H_V10__ |
| | | #define __SLP_H_V10__ |
| | | typedef unsigned char uchar; |
| | |
| | | // uchar ED; |
| | | }stSLPPacket; |
| | | |
| | | extern uchar bSLPMaster; |
| | | extern uchar nStation; |
| | | extern uchar SLPinputB; |
| | | extern uchar SLPoutputB; |
| | | extern uchar SLPErrSign; |
| | | //extern uchar bSLPMaster; |
| | | //extern uchar nStation; |
| | | //extern uchar SLPinputB; |
| | | //extern uchar SLPoutputB; |
| | | //extern uchar SLPErrSign; |
| | | |
| | | void SLPparsePacket(void * pBuf, uchar len1); |
| | | void SLPMasterSendPacket(void); |
| | | void SLPProcess(void); |
| | | typedef void (*SLPSendPktDef)(unsigned char * pBuf, int Len1); |
| | | |
| | | |
| | | typedef struct tagSLPDef |
| | | { |
| | | uchar bSLPMaster; |
| | | uchar nStation; |
| | | uchar SLPinputB; |
| | | uchar SLPoutputB; |
| | | uchar nCurStation; |
| | | uchar inputBuf[5]; |
| | | uchar outputBuf[5]; |
| | | |
| | | uchar SendBuf[8]; |
| | | |
| | | uchar SLPMasterRecved; //主机收到子机回复 |
| | | |
| | | SLPSendPktDef SLPSendPktFunc; |
| | | |
| | | unsigned int SLPSlaveCountOut; |
| | | |
| | | unsigned int SLPLostPkt; // 丢包数量 |
| | | |
| | | uchar SLPOKSign; |
| | | uchar SLPErrSign; |
| | | |
| | | int nCount; |
| | | |
| | | }stSLPDef; |
| | | |
| | | void SLPInit(stSLPDef * pSLP, SLPSendPktDef pFunc1); |
| | | void SLPSetCallBack(stSLPDef * pSLP, SLPSendPktDef pFunc1); |
| | | |
| | | void SLPparsePacket(stSLPDef * pSLP, unsigned char * pBuf, uchar len1); |
| | | void SLPMasterSendPacket(stSLPDef * pSLP); |
| | | void SLPProcess(stSLPDef * pSLP); |
| | | |
| | | |
| | | #endif /* __SLP_H_V10__ */ |
| | | |