Details | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 181 | andfri | 1 | #ifndef BIOS_H_ |
| 2 | #define BIOS_H_ |
||
| 3 | |||
| 250 | andfri | 4 | #define F_CPU 8000000UL |
| 181 | andfri | 5 | #define F_BAUD 31250UL |
| 253 | andfri | 6 | #define NODE_ID 1 |
| 181 | andfri | 7 | |
| 250 | andfri | 8 | #include "can.h" |
| 181 | andfri | 9 | |
| 10 | //--------------------------------------------------------------------------- |
||
| 11 | // Public function structure definition and declaration |
||
| 12 | |||
| 13 | typedef struct bios{ |
||
| 223 | andfri | 14 | unsigned version; |
| 181 | andfri | 15 | void (*reset)(void); |
| 250 | andfri | 16 | Can_Return_t (*can_send)(Can_Message_t* msg); |
| 17 | void (*can_callback)(Can_Message_t *msg); |
||
| 18 | void (*debug_putchar)(char c); |
||
| 19 | char (*debug_getchar)(void); |
||
| 254 | andfri | 20 | unsigned long (*timebase_get)(void); |
| 181 | andfri | 21 | } bios_t; |
| 22 | |||
| 23 | static bios_t bios_functions __attribute__ ((section (".bios_interface"))); |
||
| 24 | |||
| 228 | andfri | 25 | static bios_t *bios __attribute__ ((used)) = (bios_t*)&bios_functions; |
| 181 | andfri | 26 | |
| 27 | #endif /*BIOS_H_*/ |