Rev 360 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 360 | Rev 378 | ||
---|---|---|---|
Line 56... | Line 56... | ||
56 | #include <stdarg.h> |
56 | #include <stdarg.h> |
57 | #include "91x_lib.h" |
57 | #include "91x_lib.h" |
58 | #include "mkprotocol.h" |
58 | #include "mkprotocol.h" |
59 | #include "ramfunc.h" |
59 | #include "ramfunc.h" |
60 | #include "usb.h" |
60 | #include "usb.h" |
- | 61 | #include "uart1.h" |
|
Line 61... | Line 62... | ||
61 | 62 | ||
62 | /**************************************************************/ |
63 | /**************************************************************/ |
63 | /* Create serial output frame */ |
64 | /* Create serial output frame */ |
64 | /**************************************************************/ |
65 | /**************************************************************/ |
Line 233... | Line 234... | ||
233 | /**************************************************************/ |
234 | /**************************************************************/ |
234 | void MKProtocol_DecodeSerialFrameData(Buffer_t* pRxBuff, SerialMsg_t* pSerialMsg) |
235 | void MKProtocol_DecodeSerialFrameData(Buffer_t* pRxBuff, SerialMsg_t* pSerialMsg) |
235 | { |
236 | { |
236 | u8 a,b,c,d; |
237 | u8 a,b,c,d; |
237 | u8 x,y,z; |
238 | u8 x,y,z; |
238 | u8 ptrIn = 3; // start with first data byte in rx buffer |
239 | u16 ptrIn = 3; // start with first data byte in rx buffer |
239 | u8 ptrOut = 3; |
240 | u16 ptrOut = 3; |
240 | u8 len = pRxBuff->DataBytes - 6; // must be a multiple of 4 (3 bytes at begin and 3 bytes at end are no payload ) |
241 | u16 len = pRxBuff->DataBytes - 6; // must be a multiple of 4 (3 bytes at begin and 3 bytes at end are no payload ) |
241 | while(len) |
242 | while(len) |
242 | { |
243 | { |
243 | a = pRxBuff->pData[ptrIn++] - '='; |
244 | a = pRxBuff->pData[ptrIn++] - '='; |
244 | b = pRxBuff->pData[ptrIn++] - '='; |
245 | b = pRxBuff->pData[ptrIn++] - '='; |
245 | c = pRxBuff->pData[ptrIn++] - '='; |
246 | c = pRxBuff->pData[ptrIn++] - '='; |