Rev 558 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 558 | Rev 596 | ||
---|---|---|---|
Line 80... | Line 80... | ||
80 | } |
80 | } |
Line 81... | Line 81... | ||
81 | 81 | ||
82 | /**************************************************************/ |
82 | /**************************************************************/ |
83 | /* Create serial output frame */ |
83 | /* Create serial output frame */ |
84 | /**************************************************************/ |
84 | /**************************************************************/ |
85 | u8 MKProtocol_CreateSerialFrame(Buffer_t* pTxBuff, u8 CmdID, u8 Address, u8 numofbuffers , ...) //u8 *data, u8 len, .... |
85 | u16 MKProtocol_CreateSerialFrame(Buffer_t* pTxBuff, u8 CmdID, u8 Address, u8 numofbuffers , ...) //u8 *data, u8 len, .... |
86 | { |
86 | { |
Line 87... | Line 87... | ||
87 | va_list ap; |
87 | va_list ap; |
88 | 88 | ||
Line 167... | Line 167... | ||
167 | pTxBuff->pData[pTxBuff->Position++] = '=' + tmpCRC / 64; |
167 | pTxBuff->pData[pTxBuff->Position++] = '=' + tmpCRC / 64; |
168 | pTxBuff->pData[pTxBuff->Position++] = '=' + tmpCRC % 64; |
168 | pTxBuff->pData[pTxBuff->Position++] = '=' + tmpCRC % 64; |
169 | pTxBuff->pData[pTxBuff->Position++] = '\r'; |
169 | pTxBuff->pData[pTxBuff->Position++] = '\r'; |
170 | pTxBuff->DataBytes = pTxBuff->Position; |
170 | pTxBuff->DataBytes = pTxBuff->Position; |
171 | pTxBuff->Position = 0; // reset buffer position for transmision |
171 | pTxBuff->Position = 0; // reset buffer position for transmision |
172 | return(pTxBuff->Locked); |
172 | // return(pTxBuff->Locked); |
- | 173 | return(pTxBuff->DataBytes); |
|
173 | } |
174 | } |
Line 174... | Line 175... | ||
174 | 175 | ||
175 | // typical called in an UART Rx ISR |
176 | // typical called in an UART Rx ISR |
176 | /**************************************************************/ |
177 | /**************************************************************/ |