8 *comm callback function pointer type.
10 *uint8_t callback(uint8_t arglen, uint8_t* argbuf);
11 * payload_offst: number of bytes since the start of this payload
12 * arglen: length of the argument string passed to the function
13 * argbuf: buffer containing the argument string
15 typedef struct comm_callback_descriptor comm_callback_descriptor
;
16 typedef void (*comm_callback
)(const comm_callback_descriptor
* cb
, void* argbuf_end
);
17 struct comm_callback_descriptor
{
18 comm_callback callback
;
23 comm_callback_descriptor
const * descriptor
;
27 extern const comm_callback_descriptor comm_callbacks
[];
28 extern const uint16_t callback_count
;
30 extern volatile callback_stack_t next_callback
;
31 extern const volatile uint8_t global_argbuf
[];
34 //needs to be at least 4 bytes to accomodate args_t in comm_handle(uint8_t)
36 #define ARGBUF_SIZE 32
38 #define ARGBUF_SIZE 257
42 #define ADDRESS_DISCOVERY 0xFFFF
43 #define ADDRESS_INVALID 0xFFFE