Test1

Dependencies:   mbed

Committer:
VASKO
Date:
Sat Aug 03 21:21:01 2019 +0000
Revision:
12:6f63e376c0aa
Parent:
11:6519744c77f9
Child:
13:b9e066badefa
New struct and union types added. Arrays sizes redefined.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
VASKO 12:6f63e376c0aa 1 #define HeaderByte 0
VASKO 12:6f63e376c0aa 2 #define HeaderByteQty 5
VASKO 12:6f63e376c0aa 3 #define MsgCmdSize 1
VASKO 12:6f63e376c0aa 4 #define MsgParsSize 4
VASKO 12:6f63e376c0aa 5 #define MsgCS_Size 1
VASKO 12:6f63e376c0aa 6
VASKO 12:6f63e376c0aa 7 #define ArrTxSize (HeaderByteQty + MsgCmdSize + MsgParsSize + MsgCS_Size)
VASKO 12:6f63e376c0aa 8 #define ArrRxSize (HeaderByteQty + MsgCmdSize + MsgParsSize + MsgCS_Size)
VASKO 12:6f63e376c0aa 9
VASKO 12:6f63e376c0aa 10
VASKO 12:6f63e376c0aa 11
VASKO 12:6f63e376c0aa 12
VASKO 12:6f63e376c0aa 13 //#define ArrTxInitializer {0x20,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4b,0x4c,0x4d,0x4e,0x4f}
VASKO 12:6f63e376c0aa 14 #define ArrTxInitializer {}
VASKO 12:6f63e376c0aa 15 //#define ArrRxInitializer {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
VASKO 12:6f63e376c0aa 16 #define ArrRxInitializer {}
VASKO 11:6519744c77f9 17
VASKO 11:6519744c77f9 18 extern uint8_t RxBuff[ArrRxSize];
VASKO 11:6519744c77f9 19 extern uint8_t TxBuff[ArrTxSize];
VASKO 11:6519744c77f9 20 extern bool ArrRxCmplt;
VASKO 11:6519744c77f9 21 extern bool ArrTxBusy;
VASKO 11:6519744c77f9 22 extern bool TxBuffFull;
VASKO 11:6519744c77f9 23 extern void StartTx();
VASKO 12:6f63e376c0aa 24 extern void TxRxServiceInit();
VASKO 12:6f63e376c0aa 25
VASKO 12:6f63e376c0aa 26 typedef union {
VASKO 12:6f63e376c0aa 27 uint8_t ui8[4];
VASKO 12:6f63e376c0aa 28 int8_t i8[4];
VASKO 12:6f63e376c0aa 29 uint16_t ui16[2];
VASKO 12:6f63e376c0aa 30 int16_t i16[2];
VASKO 12:6f63e376c0aa 31 uint32_t ui32;
VASKO 12:6f63e376c0aa 32 int32_t i32;
VASKO 12:6f63e376c0aa 33 float f;
VASKO 12:6f63e376c0aa 34 } ParsType;
VASKO 12:6f63e376c0aa 35
VASKO 12:6f63e376c0aa 36 typedef struct {
VASKO 12:6f63e376c0aa 37 uint8_t cmd;
VASKO 12:6f63e376c0aa 38 ParsType pars;
VASKO 12:6f63e376c0aa 39 uint8_t cs;
VASKO 12:6f63e376c0aa 40 } MsgType;
VASKO 12:6f63e376c0aa 41