Subversion Repositories HomeAutomation

Rev

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
181 andfri 6
 
7
#include "bios.h"
8
 
253 andfri 9
extern uint16_t __bios_start;
10
 
181 andfri 11
//---------------------------------------------------------------------------
12
// Function prototypes for the exported interface
13
 
223 andfri 14
static void reset(void);
15
static void bios_putchar(char c);
16
static char bios_getchar(void);
17
static long timebase_get(void);
250 andfri 18
static Can_Return_t can_send(Can_Message_t* msg);
181 andfri 19
 
20
static bios_t bios_functions = {
223 andfri 21
    BIOS_VERSION,
22
    reset,
250 andfri 23
    can_send,
24
    0,
181 andfri 25
    bios_putchar,
26
    bios_getchar,
223 andfri 27
    timebase_get
181 andfri 28
};
29
 
253 andfri 30
#define CAN_ID_NMT_BIOS_START  ((CAN_NMT << CAN_SHIFT_CLASS) \
31
                              | (CAN_NMT_BIOS_START << CAN_SHIFT_NMT_TYPE) \
32
                              | (NODE_ID << CAN_SHIFT_NMT_SID))
33
#define CAN_ID_NMT_PGM_ACK     ((CAN_NMT << CAN_SHIFT_CLASS) \
34
                              | (CAN_NMT_PGM_ACK << CAN_SHIFT_NMT_TYPE) \
35
                              | (NODE_ID << CAN_SHIFT_NMT_SID))
36
#define CAN_ID_NMT_PGM_NACK    ((CAN_NMT << CAN_SHIFT_CLASS) \
37
                              | (CAN_NMT_PGM_NACK << CAN_SHIFT_NMT_TYPE) \
38
                              | (NODE_ID << CAN_SHIFT_NMT_SID))
250 andfri 39
 
181 andfri 40
#endif /*BIOS_FUNS_H_*/