Subversion Repositories HomeAutomation

Rev

Rev 250 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 250 Rev 253
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
 
7
 
7
#include "can.h"
8
#include "can.h"
8
 
9
 
9
//---------------------------------------------------------------------------
10
//---------------------------------------------------------------------------
10
// Public function structure definition and declaration
11
// Public function structure definition and declaration
11
 
12
 
12
typedef struct bios{
13
typedef struct bios{
13
    unsigned version;
14
    unsigned version;
14
    void (*reset)(void);
15
    void (*reset)(void);
15
    Can_Return_t (*can_send)(Can_Message_t* msg);
16
    Can_Return_t (*can_send)(Can_Message_t* msg);
16
    void (*can_callback)(Can_Message_t *msg);
17
    void (*can_callback)(Can_Message_t *msg);
17
    void (*debug_putchar)(char c);
18
    void (*debug_putchar)(char c);
18
    char (*debug_getchar)(void);
19
    char (*debug_getchar)(void);
19
    long (*timebase_get)(void);
20
    long (*timebase_get)(void);
20
} bios_t;
21
} bios_t;
21
 
22
 
22
static bios_t bios_functions __attribute__ ((section (".bios_interface")));
23
static bios_t bios_functions __attribute__ ((section (".bios_interface")));
23
 
24
 
24
static bios_t *bios __attribute__ ((used)) = (bios_t*)&bios_functions;
25
static bios_t *bios __attribute__ ((used)) = (bios_t*)&bios_functions;
25
 
26
 
26
#endif /*BIOS_H_*/
27
#endif /*BIOS_H_*/
27
 
28