root / trunk / toolbox / jumptable.h @ 292
History | View | Annotate | Download (599 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 0x7FC |
| 7 | #define JT_PARSE_PACKET ((void*)((JT_ADDR+0)/2)) |
| 8 | #define JT_SEND_PACKET ((void*)((JT_ADDR+2)/2)) |
| 9 | #define JT_READ_ADDR ((void*)((JT_ADDR+4)/2)) |
| 10 | |
| 11 | #define JT_TYPE static __inline__ void |
| 12 | typedef void (*PF_ARG1)(uint8_t); |
| 13 | |
| 14 | char (*parse_packet)(uint8_t*, uint8_t*,uint8_t) = JT_PARSE_PACKET;
|
| 15 | void (*send_packet)(uint8_t, uint8_t, uint8_t*, uint8_t) = JT_SEND_PACKET;
|
| 16 | uint8_t (*read_addr)(void) = JT_READ_ADDR;
|
| 17 | |
| 18 | #endif
|