1 | /////////////////////////////////////////////////////////////////////////////////// |
---|
2 | // File : drivers.h |
---|
3 | // Date : 01/04/2012 |
---|
4 | // Author : alain greiner and joel porquet |
---|
5 | // Copyright (c) UPMC-LIP6 |
---|
6 | /////////////////////////////////////////////////////////////////////////////////// |
---|
7 | |
---|
8 | #ifndef _DRIVERS_H_ |
---|
9 | #define _DRIVERS_H_ |
---|
10 | |
---|
11 | /////////////////////////////////////////////////////////////////////////////////// |
---|
12 | // Global variables for interaction with ISRs |
---|
13 | /////////////////////////////////////////////////////////////////////////////////// |
---|
14 | |
---|
15 | extern volatile unsigned int _dma_status[]; |
---|
16 | extern volatile unsigned char _dma_busy[]; |
---|
17 | |
---|
18 | extern volatile unsigned char _ioc_status; |
---|
19 | extern volatile unsigned char _ioc_done; |
---|
20 | extern volatile unsigned int _ioc_lock; |
---|
21 | |
---|
22 | extern volatile unsigned char _tty_get_buf[]; |
---|
23 | extern volatile unsigned char _tty_get_full[]; |
---|
24 | |
---|
25 | /////////////////////////////////////////////////////////////////////////////////// |
---|
26 | // Prototypes of the drivers functions. |
---|
27 | /////////////////////////////////////////////////////////////////////////////////// |
---|
28 | |
---|
29 | unsigned int _timer_write(unsigned int global, unsigned int reg, unsigned int value); |
---|
30 | unsigned int _timer_read(unsigned int global, unsigned int reg, unsigned int *buffer); |
---|
31 | |
---|
32 | unsigned int _tty_write(const char *buffer, unsigned int length); |
---|
33 | unsigned int _tty_read(char *buffer, unsigned int length); |
---|
34 | unsigned int _tty_read_irq(char *buffer, unsigned int length); |
---|
35 | |
---|
36 | unsigned int _ioc_write(unsigned int lba, const void *buffer, unsigned int count); |
---|
37 | unsigned int _ioc_read(unsigned int lba, void *buffer, unsigned int count); |
---|
38 | unsigned int _ioc_completed(); |
---|
39 | |
---|
40 | unsigned int _icu_write(unsigned int register_index, unsigned int value); |
---|
41 | unsigned int _icu_read(unsigned int register_index, unsigned int *buffer); |
---|
42 | |
---|
43 | unsigned int _gcd_write(unsigned int register_index, unsigned int value); |
---|
44 | unsigned int _gcd_read(unsigned int register_index, unsigned int *buffer); |
---|
45 | |
---|
46 | unsigned int _fb_sync_write(unsigned int offset, const void *buffer, unsigned int length); |
---|
47 | unsigned int _fb_sync_read(unsigned int offset, const void *buffer, unsigned int length); |
---|
48 | unsigned int _fb_write(unsigned int offset, const void *buffer, unsigned int length); |
---|
49 | unsigned int _fb_read(unsigned int offset, const void *buffer, unsigned int length); |
---|
50 | unsigned int _fb_completed(); |
---|
51 | |
---|
52 | #endif |
---|
53 | |
---|