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