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 _GIET_SYS_DRIVERS_H_ |
---|
9 | #define _GIET_SYS_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 unsigned int _ioc_lock; |
---|
21 | |
---|
22 | extern volatile unsigned char _tty_get_buf[]; |
---|
23 | extern volatile unsigned char _tty_get_full[]; |
---|
24 | extern unsigned int _tty_put_lock; |
---|
25 | |
---|
26 | /////////////////////////////////////////////////////////////////////////////////// |
---|
27 | // Prototypes of the external functions. |
---|
28 | /////////////////////////////////////////////////////////////////////////////////// |
---|
29 | |
---|
30 | unsigned int _timer_write( unsigned int cluster_id, |
---|
31 | unsigned int timer_id, |
---|
32 | unsigned int register_id, |
---|
33 | unsigned int value); |
---|
34 | |
---|
35 | unsigned int _timer_read( unsigned int cluster_id, |
---|
36 | unsigned int timer_id, |
---|
37 | unsigned int register_id, |
---|
38 | unsigned int* buffer); |
---|
39 | |
---|
40 | unsigned int _icu_write( unsigned int cluster_id, |
---|
41 | unsigned int proc_id, |
---|
42 | unsigned int register_id, |
---|
43 | unsigned int value); |
---|
44 | |
---|
45 | unsigned int _icu_read( unsigned int cluster_id, |
---|
46 | unsigned int proc_id, |
---|
47 | unsigned int register_id, |
---|
48 | unsigned int* buffer); |
---|
49 | |
---|
50 | unsigned int _tty_write( const char* buffer, |
---|
51 | unsigned int length); |
---|
52 | |
---|
53 | unsigned int _tty_read( char* buffer, |
---|
54 | unsigned int length); |
---|
55 | |
---|
56 | unsigned int _tty_read_irq( char* buffer, |
---|
57 | unsigned int length); |
---|
58 | |
---|
59 | unsigned int _ioc_write( unsigned int lba, |
---|
60 | const void* buffer, |
---|
61 | unsigned int count); |
---|
62 | |
---|
63 | unsigned int _ioc_read( unsigned int lba, |
---|
64 | void* buffer, |
---|
65 | unsigned int count); |
---|
66 | |
---|
67 | unsigned int _ioc_completed(); |
---|
68 | |
---|
69 | unsigned int _gcd_write( unsigned int register_index, |
---|
70 | unsigned int value); |
---|
71 | |
---|
72 | unsigned int _gcd_read( unsigned int register_index, |
---|
73 | unsigned int* buffer); |
---|
74 | |
---|
75 | unsigned int _fb_sync_write(unsigned int offset, |
---|
76 | const void* buffer, |
---|
77 | unsigned int length); |
---|
78 | |
---|
79 | unsigned int _fb_sync_read( unsigned int offset, |
---|
80 | const void* buffer, |
---|
81 | unsigned int length); |
---|
82 | |
---|
83 | unsigned int _fb_write( unsigned int offset, |
---|
84 | const void* buffer, |
---|
85 | unsigned int length); |
---|
86 | |
---|
87 | unsigned int _fb_read( unsigned int offset, |
---|
88 | const void* buffer, |
---|
89 | unsigned int length); |
---|
90 | |
---|
91 | unsigned int _fb_completed(); |
---|
92 | |
---|
93 | #endif |
---|
94 | |
---|