Subversion Repositories HomeAutomation

Rev

Rev 250 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 250 Rev 253
Line 4... Line 4...
4
#define BIOS_BUILDTYPE_BIOS
4
#define BIOS_BUILDTYPE_BIOS
5
#define BIOS_VERSION 0x1002
5
#define BIOS_VERSION 0x1004
6
 
6
 
7
#include "bios.h"
7
#include "bios.h"
-
 
8
 
-
 
9
extern uint16_t __bios_start;
8
 
10
 
9
//---------------------------------------------------------------------------
11
//---------------------------------------------------------------------------
10
// Function prototypes for the exported interface
12
// Function prototypes for the exported interface
11
 
13
 
12
static void reset(void);
14
static void reset(void);
13
static void bios_putchar(char c);
15
static void bios_putchar(char c);
14
static char bios_getchar(void);
16
static char bios_getchar(void);
15
static long timebase_get(void);
17
static long timebase_get(void);
16
static Can_Return_t can_send(Can_Message_t* msg);
18
static Can_Return_t can_send(Can_Message_t* msg);
17
//static Can_Return_t can_receive(Can_Message_t *msg);
-
 
18
 
19
 
19
static bios_t bios_functions = {
20
static bios_t bios_functions = {
20
    BIOS_VERSION,
21
    BIOS_VERSION,
21
    reset,
22
    reset,
22
    can_send,
23
    can_send,
23
    0,
24
    0,
24
    bios_putchar,
25
    bios_putchar,
25
    bios_getchar,
26
    bios_getchar,
26
    timebase_get
27
    timebase_get
27
};
28
};
28
 
29
 
29
//---------------------------------------------------------------------------
30
#define CAN_ID_NMT_BIOS_START  ((CAN_NMT << CAN_SHIFT_CLASS) \
30
// Special CAN masks
31
                              | (CAN_NMT_BIOS_START << CAN_SHIFT_NMT_TYPE) \
31
 
-
 
32
// completely bogus
32
                              | (NODE_ID << CAN_SHIFT_NMT_SID))
33
#define CAN_FUNCT_MASK  0x00000F
33
#define CAN_ID_NMT_PGM_ACK     ((CAN_NMT << CAN_SHIFT_CLASS) \
34
#define CAN_MSG_TYPE_BIOS   0x0
34
                              | (CAN_NMT_PGM_ACK << CAN_SHIFT_NMT_TYPE) \
35
#define CAN_MSG_TYPE_APP    0x1
35
                              | (NODE_ID << CAN_SHIFT_NMT_SID))
36
#define CAN_MSG_TYPE_BAJS   0x4
36
#define CAN_ID_NMT_PGM_NACK    ((CAN_NMT << CAN_SHIFT_CLASS) \
37
#define CAN_MSG_TYPE_LOPRIO 0xf
37
                              | (CAN_NMT_PGM_NACK << CAN_SHIFT_NMT_TYPE) \
-
 
38
                              | (NODE_ID << CAN_SHIFT_NMT_SID))
38
 
39
 
39
#endif /*BIOS_FUNS_H_*/
40
#endif /*BIOS_FUNS_H_*/