Go to the documentation of this file.
102 #if defined(__PIC24H__) || defined(__PIC24F__) || defined(__dsPIC33F__) || defined(__PIC24FK__) || defined(__PIC24E__) || defined(__dsPIC33E__)
103 #define MICROCONTROLLER
121 #if defined(__cplusplus)
124 # define NULL nullptr
145 # define ASSERT(placeholder) (void)0
147 # define ASSERT(x) if (!(x)) throw #x
154 # define ASSERT(msg, expr) (void)0
156 # define ASSERTM(msg, expr) if (! (expr)) throw msg ": " #expr
161 #else // #if defined(__cplusplus)
173 # define ASSERT(placeholder) (void)0
176 # define ASSERT(x) assert(x)
182 # define ASSERTM(msg, expr) ASSERT(expr)
185 # define BOOL unsigned char
192 #ifndef MICROCONTROLLER
205 #define CMD_TOKEN ((char) 0xAA)
209 #define ESCAPED_CMD ((char) 0xFC)
213 #define CMD_LONG_VAR ((char) 0xFD)
217 #define CMD_SEND_ONLY ((char) 0xFE)
221 #define CMD_SEND_RECEIVE_VAR ((char) 0xFF)
225 #define VAR_SIZE_BITS 2
228 #define VAR_SIZE_MASK ((1 << VAR_SIZE_BITS) - 1)
232 #define SHORT_VAR_MAX_LEN (1 << VAR_SIZE_BITS)
319 #if !defined(MICROCONTROLLER) || defined(__DOXYGEN__)
331 #define MAX_NUM_XFER_VARS ((1 << (8 - VAR_SIZE_BITS)) - 1)
335 #define NUM_XFER_VARS 62
336 #if NUM_XFER_VARS > MAX_NUM_XFER_VARS
337 # error "Too many transfer variables; there must be MAX_NUM_XFER_VARS or fewer."
358 #define CHAR_RECEIVED_INDEX 0xFF
412 #define NUM_ERROR_CODES (ERR_MICROCONTROLLER_VAR_SPEC + 1)
431 #if !defined(MICROCONTROLLER) || defined(__DOXYGEN__)
461 #if !defined(MICROCONTROLLER) || defined(__DOXYGEN__)