root / trunk / toolbox / jumptable.h @ 192
History | View | Annotate | Download (775 Bytes)
1 |
#ifndef _JUMPTABLE_
|
---|---|
2 |
#define _JUMPTABLE_
|
3 |
|
4 |
// Jump table addresses
|
5 |
// If the bootloader changes, you must change the jump table addresses!
|
6 |
#define JT_ADDR 0x7E0 |
7 |
#define JT_RS485_INIT ((void*)((JT_ADDR+0) / 2)) |
8 |
#define JT_RS485_GET_BYTE ((void*)((JT_ADDR+2)/2)) |
9 |
#define JT_RS485_SEND_BYTE ((void*)((JT_ADDR+4)/2)) |
10 |
#define JT_PARSE_PACKET ((void*)((JT_ADDR+6)/2)) |
11 |
#define JT_SEND_PACKET ((void*)((JT_ADDR+8)/2)) |
12 |
|
13 |
#define JT_TYPE static __inline__ void |
14 |
typedef void (*PF_ARG1)(uint8_t); |
15 |
|
16 |
void (*rs485_init)(uint16_t) = JT_RS485_INIT;
|
17 |
int8_t (*rs485_get_byte)(uint8_t*) = JT_RS485_GET_BYTE; |
18 |
void (*rs485_send_byte)(uint8_t) = JT_RS485_SEND_BYTE;
|
19 |
char (*parse_packet)(uint8_t*) = JT_PARSE_PACKET;
|
20 |
void (*send_packet)(uint8_t) = JT_SEND_PACKET;
|
21 |
|
22 |
#endif
|