Rev 253 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 253 | Rev 254 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | #ifndef BIOS_FUNS_H_ |
1 | #ifndef BIOS_FUNS_H_ |
| 2 | #define BIOS_FUNS_H_ |
2 | #define BIOS_FUNS_H_ |
| 3 | 3 | ||
| 4 | #define BIOS_BUILDTYPE_BIOS |
4 | #define BIOS_BUILDTYPE_BIOS |
| 5 | #define BIOS_VERSION 0x1004 |
5 | #define BIOS_VERSION 0x1004 |
| - | 6 | #define BIOS_UART |
|
| 6 | 7 | ||
| 7 | #include "bios.h" |
8 | #include "bios.h" |
| 8 | 9 | ||
| 9 | extern uint16_t __bios_start; |
10 | extern uint16_t __bios_start; |
| 10 | 11 | ||
| 11 | //--------------------------------------------------------------------------- |
12 | //--------------------------------------------------------------------------- |
| 12 | // Function prototypes for the exported interface |
13 | // Function prototypes for the exported interface |
| 13 | 14 | ||
| 14 | static void reset(void); |
15 | static void reset(void); |
| - | 16 | #ifdef BIOS_UART |
|
| 15 | static void bios_putchar(char c); |
17 | static void bios_putchar(char c); |
| 16 | static char bios_getchar(void); |
18 | static char bios_getchar(void); |
| - | 19 | #endif |
|
| 17 | static long timebase_get(void); |
20 | static unsigned long timebase_get(void); |
| 18 | static Can_Return_t can_send(Can_Message_t* msg); |
21 | static Can_Return_t can_send(Can_Message_t* msg); |
| 19 | 22 | ||
| 20 | static bios_t bios_functions = { |
23 | static bios_t bios_functions = { |
| 21 | BIOS_VERSION, |
24 | BIOS_VERSION, |
| 22 | reset, |
25 | reset, |
| 23 | can_send, |
26 | can_send, |
| 24 | 0, |
27 | 0, |
| - | 28 | #ifdef BIOS_UART |
|
| 25 | bios_putchar, |
29 | bios_putchar, |
| 26 | bios_getchar, |
30 | bios_getchar, |
| - | 31 | #else |
|
| - | 32 | 0, |
|
| - | 33 | 0, |
|
| - | 34 | #endif |
|
| 27 | timebase_get |
35 | timebase_get |
| 28 | }; |
36 | }; |
| 29 | 37 | ||
| 30 | #define CAN_ID_NMT_BIOS_START ((CAN_NMT << CAN_SHIFT_CLASS) \ |
38 | #define CAN_ID_NMT_BIOS_START ((CAN_NMT << CAN_SHIFT_CLASS) \ |
| 31 | | (CAN_NMT_BIOS_START << CAN_SHIFT_NMT_TYPE) \ |
39 | | (CAN_NMT_BIOS_START << CAN_SHIFT_NMT_TYPE) \ |