Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
181 andfri 1
#ifndef BIOS_H_
2
#define BIOS_H_
3
 
250 andfri 4
#define F_CPU 8000000UL
181 andfri 5
#define F_BAUD  31250UL
6
 
250 andfri 7
#include "can.h"
181 andfri 8
 
9
//---------------------------------------------------------------------------
10
// Public function structure definition and declaration
11
 
12
typedef struct bios{
223 andfri 13
    unsigned version;
181 andfri 14
    void (*reset)(void);
250 andfri 15
    Can_Return_t (*can_send)(Can_Message_t* msg);
16
    void (*can_callback)(Can_Message_t *msg);
17
    void (*debug_putchar)(char c);
18
    char (*debug_getchar)(void);
223 andfri 19
    long (*timebase_get)(void);
181 andfri 20
} bios_t;
21
 
22
static bios_t bios_functions __attribute__ ((section (".bios_interface")));
23
 
228 andfri 24
static bios_t *bios __attribute__ ((used)) = (bios_t*)&bios_functions;
181 andfri 25
 
26
#endif /*BIOS_H_*/