Statistics
| Revision:

root / branch / elmansour / bsp / periph.h @ 31

History | View | Annotate | Download (585 Bytes)

1

    
2
#define ADDR(x) (x -'A')
3

    
4
int periph_read (char addr,int * val);
5
void periph_write (char addr,int valeur);
6
void periph_inter(char addr);
7
void iperiph_write (char addr,int valeur);
8
void iperiph_inter(char addr);
9
void periph_even(char addr);
10

    
11
static void int_2_hex(unsigned int val, char * str);
12

    
13
typedef union {        
14
        struct {
15
                unsigned char id;
16
                unsigned char rtr;
17
                unsigned int  val;
18
        }data;
19
        VP_INT  msg;
20
}CanFrame;
21

    
22
typedef struct {
23
        unsigned char maj;
24
        unsigned short val;
25
        UINT ev;
26
}Tperiph;
27

    
28
void periph_init(void);
29

    
30
extern Tperiph periph['z'-'A'];