vasko ozo / Mbed 2 deprecated TxRxService

Dependencies:   mbed

Revision:
15:30e45bd5902e
Parent:
14:b113f676ef42
Child:
16:459ad1bd82fd
--- a/TxRxService.h	Sun Aug 04 14:09:35 2019 +0000
+++ b/TxRxService.h	Sun Aug 04 15:43:47 2019 +0000
@@ -1,11 +1,11 @@
-#define HeaderByte 0
-#define HeaderByteQty 5
+#define HeaderByte 0x48
+#define HeaderLength 5
 #define MsgCmdSize 1
 #define MsgParsSize 4
 #define MsgCS_Size 1
 
-#define ArrTxSize (HeaderByteQty + MsgCmdSize + MsgParsSize + MsgCS_Size)
-#define ArrRxSize (HeaderByteQty + MsgCmdSize + MsgParsSize + MsgCS_Size)
+#define ArrTxSize (HeaderLength + MsgCmdSize + MsgParsSize + MsgCS_Size)
+#define ArrRxSize (HeaderLength + MsgCmdSize + MsgParsSize + MsgCS_Size)
 
 enum StartTxStates {
     StartOK,
@@ -14,19 +14,12 @@
     };
 
 //#define ArrTxInitializer {0x20,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4b,0x4c,0x4d,0x4e,0x4f}
-#define ArrTxInitializer {}
+#define ArrTxInitializer {0x2D,HeaderByte,HeaderByte,HeaderByte,0x3D}
 //#define ArrRxInitializer {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
 #define ArrRxInitializer {}
 
-extern uint8_t RxBuff[ArrRxSize];
-extern uint8_t TxBuff[ArrTxSize];
-extern bool RxBuffFull;
-extern bool ArrTxBusy;
-extern bool TxBuffFull;
-extern StartTxStates StartTx(uint8_t *parr);
-extern void TxRxServiceInit();
+//typedef uint8_t TxArrType[ArrTxSize];
 
-//typedef uint8_t TxArrType[ArrTxSize];
 typedef union {
     uint8_t ui8[4];
     int8_t i8[4];
@@ -42,4 +35,14 @@
     ParsType pars;
     uint8_t cs;
     } MsgType;
-       
\ No newline at end of file
+
+//extern uint8_t RxBuff[ArrRxSize];
+extern MsgType RxBuff;
+//extern uint8_t TxBuff[ArrTxSize];
+extern MsgType TxBuff;
+extern bool RxBuffFull;
+extern bool ArrTxBusy;
+extern bool TxBuffFull;
+extern StartTxStates StartTx(uint8_t *parr);
+extern void TxRxServiceInit();
+extern uint8_t GetCheckSum(uint8_t *p); 
\ No newline at end of file