35 #ifndef FILE_COMMS_CORE_H_SEEN
36 #define FILE_COMMS_CORE_H_SEEN
40 #warning "EXTERN already defined by another header, please sort it out!"
53 #define TX_MAX_PAYLOAD_SIZE (TX_BUFFER_SIZE - 32)
78 #define START_BYTE 0xAA
79 #define ESCAPE_BYTE 0xBB
80 #define STOP_BYTE 0xCC
82 #define ESCAPED_START_BYTE 0x55
83 #define ESCAPED_ESCAPE_BYTE 0x44
84 #define ESCAPED_STOP_BYTE 0x33
88 #define COM_SET_SCI0_INTERFACE_ID BIT0
89 #define COM_SET_CAN0_INTERFACE_ID BIT1
90 #define COM_SET_SPARE2_INTERFACE_ID BIT2
91 #define COM_SET_SPARE3_INTERFACE_ID BIT3
92 #define COM_SET_SPARE4_INTERFACE_ID BIT4
93 #define COM_SET_SPARE5_INTERFACE_ID BIT5
94 #define COM_SET_SPARE6_INTERFACE_ID BIT6
95 #define COM_SET_SPARE7_INTERFACE_ID BIT7
96 #define COM_CLEAR_SCI0_INTERFACE_ID NBIT0
97 #define COM_CLEAR_CAN0_INTERFACE_ID NBIT1
98 #define COM_CLEAR_SPARE2_INTERFACE_ID NBIT2
99 #define COM_CLEAR_SPARE3_INTERFACE_ID NBIT3
100 #define COM_CLEAR_SPARE4_INTERFACE_ID NBIT4
101 #define COM_CLEAR_SPARE5_INTERFACE_ID NBIT5
102 #define COM_CLEAR_SPARE6_INTERFACE_ID NBIT6
103 #define COM_CLEAR_SPARE7_INTERFACE_ID NBIT7
104 #define CLEAR_ALL_SOURCE_ID_FLAGS ZEROS
113 #define RX_READY_TO_PROCESS BIT1
114 #define RX_SCI_ESCAPED_NEXT BIT2
117 #define RX_CLEAR_READY_TO_PROCESS NBIT1
118 #define RX_SCI_NOT_ESCAPED_NEXT NBIT2
127 #define SCICR2_RX_ENABLE BIT2
128 #define SCICR2_TX_ENABLE BIT3
129 #define SCICR2_RX_ISR_ENABLE BIT5
130 #define SCICR2_TX_ISR_ENABLE BIT7
131 #define SCICR2_RX_DISABLE NBIT2
132 #define SCICR2_TX_DISABLE NBIT3
133 #define SCICR2_RX_ISR_DISABLE NBIT5
134 #define SCICR2_TX_ISR_DISABLE NBIT7
157 #define HEADER_HAS_LENGTH BIT0
158 #define HEADER_IS_NACK BIT1
159 #define HEADER_HAS_SEQUENCE BIT2
160 #define HEADER_RESERVED_E BIT3
161 #define HEADER_RESERVED_D BIT4
162 #define HEADER_RESERVED_C BIT5
163 #define HEADER_RESERVED_B BIT6
164 #define HEADER_RESERVED_A BIT7
167 #define asyncDatalogOff 0x00
168 #define asyncDatalogBasic 0x01
169 #define asyncDatalogScratchPad 0x02
170 #define asyncDatalogStructs 0x03
171 #define asyncDatalogPosition 0x04
172 #define asyncDatalogBlockBytes 0x05
173 #define asyncDatalogBlockWords 0x06
174 #define asyncDatalogBlockLongs 0x07
175 #define asyncDatalogStreamByte 0x08
176 #define asyncDatalogStreamWord 0x09
177 #define asyncDatalogStreamLong 0x0A
178 #define asyncDatalogLastType asyncDatalogStreamLong
191 #warning "Header file COMMS_CORE_H seen before, sort it out!"