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