@@ -0,0 +1,35 | |||||
|
1 | #ifndef APB_CNA_DRIVER_H | |||
|
2 | #define APB_CNA_DRIVER_H | |||
|
3 | ||||
|
4 | #define DAC_ready 3 | |||
|
5 | #define DAC_enable 1 | |||
|
6 | #define DAC_disable 0 | |||
|
7 | ||||
|
8 | ||||
|
9 | /*=================================================== | |||
|
10 | T Y P E S D E F | |||
|
11 | ====================================================*/ | |||
|
12 | ||||
|
13 | struct DAC_Driver | |||
|
14 | { | |||
|
15 | int configReg; | |||
|
16 | int dataReg; | |||
|
17 | }; | |||
|
18 | ||||
|
19 | typedef struct DAC_Driver DAC_Device; | |||
|
20 | ||||
|
21 | /*=================================================== | |||
|
22 | F U N C T I O N S | |||
|
23 | ====================================================*/ | |||
|
24 | ||||
|
25 | DAC_Device* DacOpen(int count); | |||
|
26 | ||||
|
27 | //DAC_Device* DacClose(int count); | |||
|
28 | ||||
|
29 | int DacTable(); | |||
|
30 | ||||
|
31 | int DacConst(); | |||
|
32 | ||||
|
33 | ||||
|
34 | ||||
|
35 | #endif |
@@ -1,26 +1,27 | |||||
1 | # use glob syntax. |
|
1 | # use glob syntax. | |
2 | syntax: glob |
|
2 | syntax: glob | |
3 |
|
3 | |||
4 | *.tex |
|
4 | *.tex | |
5 | *.html |
|
5 | *.html | |
6 | *log* |
|
6 | *log* | |
7 | *.png |
|
7 | *.png | |
8 | *.dot |
|
8 | *.dot | |
9 | *.css |
|
9 | *.css | |
10 | *.md5 |
|
10 | *.md5 | |
11 | *.eps |
|
11 | *.eps | |
12 |
|
12 | |||
13 | *.toc |
|
13 | *.toc | |
14 | *.map |
|
14 | *.map | |
15 | *.sty |
|
15 | *.sty | |
16 | *.3 |
|
16 | *.3 | |
17 | *.js |
|
17 | *.js | |
18 | *.aux |
|
18 | *.aux | |
19 | *.idx |
|
19 | *.idx | |
20 | *doc* |
|
20 | *doc* | |
21 | *Doc* |
|
21 | *Doc* | |
22 | *vhdlsyn.txt |
|
22 | *vhdlsyn.txt | |
23 | *.orig |
|
23 | *.orig | |
24 | *.o |
|
24 | *.o | |
|
25 | *.a | |||
25 | *~ |
|
26 | *~ | |
26 |
|
27 |
@@ -1,65 +1,67 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the LPP VHDL IP LIBRARY |
|
2 | -- This file is a part of the LPP VHDL IP LIBRARY | |
3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS |
|
3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 3 of the License, or |
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 |
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | #ifndef LPP_APB_FUNCTIONS_H |
|
19 | #ifndef LPP_APB_FUNCTIONS_H | |
20 | #define LPP_APB_FUNCTIONS_H |
|
20 | #define LPP_APB_FUNCTIONS_H | |
21 |
|
21 | |||
22 | #define APB_TBL_HEAD 0x800FF000 |
|
22 | #define APB_TBL_HEAD 0x800FF000 | |
23 | #define APB_BASE_ADDRS 0x80000000 |
|
23 | #define APB_BASE_ADDRS 0x80000000 | |
24 | #define APB_MAX_DEVICES 256 |
|
24 | #define APB_MAX_DEVICES 256 | |
25 |
|
25 | |||
26 | #define VENDOR_LPP 0x19 |
|
26 | #define VENDOR_LPP 0x19 | |
27 |
|
27 | |||
28 | #define ROCKET_TM 0x001 |
|
28 | #define ROCKET_TM 0x001 | |
29 | #define otherCore 0x002 |
|
29 | #define otherCore 0x002 | |
30 | #define LPP_SIMPLE_DIODE 0x003 |
|
30 | #define LPP_SIMPLE_DIODE 0x003 | |
31 | #define LPP_MULTI_DIODE 0x004 |
|
31 | #define LPP_MULTI_DIODE 0x004 | |
32 | #define LPP_LCD_CTRLR 0x005 |
|
32 | #define LPP_LCD_CTRLR 0x005 | |
|
33 | #define LPP_UART_CTRLR 0x006 | |||
|
34 | #define LPP_DAC_CTRLR 0x007 | |||
33 |
|
35 | |||
34 | /** @todo implemente a descriptor structure for any APB device */ |
|
36 | /** @todo implemente a descriptor structure for any APB device */ | |
35 |
|
37 | |||
36 |
|
38 | |||
37 | /** Structure representing a device descriptor register on Grlib's AHB2APB brige with plug and play feature */ |
|
39 | /** Structure representing a device descriptor register on Grlib's AHB2APB brige with plug and play feature */ | |
38 | struct apbPnPreg |
|
40 | struct apbPnPreg | |
39 | { |
|
41 | { | |
40 | int idReg; /**< id register composed of Vendor ID [31:24], Device ID [23:12], CT [11:10], Version [9:5], IRQ [4:0] */ |
|
42 | int idReg; /**< id register composed of Vendor ID [31:24], Device ID [23:12], CT [11:10], Version [9:5], IRQ [4:0] */ | |
41 | int bar; /**< Bank Address Register composed of Device's ADDRESS [31:20], MASK [14:4], TYPE [3:0] */ |
|
43 | int bar; /**< Bank Address Register composed of Device's ADDRESS [31:20], MASK [14:4], TYPE [3:0] */ | |
42 | }; |
|
44 | }; | |
43 |
|
45 | |||
44 | struct apbdevinfo |
|
46 | struct apbdevinfo | |
45 | { |
|
47 | { | |
46 | int vendorID; |
|
48 | int vendorID; | |
47 | int productID; |
|
49 | int productID; | |
48 | int version; |
|
50 | int version; | |
49 | int irq; |
|
51 | int irq; | |
50 | int address; |
|
52 | int address; | |
51 | int mask; |
|
53 | int mask; | |
52 | }; |
|
54 | }; | |
53 |
|
55 | |||
54 | /** This Function scans APB devices table and returns counth device according to VID and PID */ |
|
56 | /** This Function scans APB devices table and returns counth device according to VID and PID */ | |
55 | int* apbgetdevice(int PID,int VID,int count); |
|
57 | int* apbgetdevice(int PID,int VID,int count); | |
56 | /** This Function scans APB devices table and returns counth device informations according VID and PID */ |
|
58 | /** This Function scans APB devices table and returns counth device informations according VID and PID */ | |
57 | void apbgetdeviceinfofromid(int PID,int VID,int count,struct apbdevinfo* devinfo); |
|
59 | void apbgetdeviceinfofromid(int PID,int VID,int count,struct apbdevinfo* devinfo); | |
58 |
|
60 | |||
59 | void apbgetdeviceinfofromdevptr(const struct apbPnPreg* dev,struct apbdevinfo* devinfo); |
|
61 | void apbgetdeviceinfofromdevptr(const struct apbPnPreg* dev,struct apbdevinfo* devinfo); | |
60 |
|
62 | |||
61 |
|
63 | |||
62 | void apbprintdeviceinfo(struct apbdevinfo devinfo); |
|
64 | void apbprintdeviceinfo(struct apbdevinfo devinfo); | |
63 |
|
65 | |||
64 | void apbprintdeviceslist(); |
|
66 | void apbprintdeviceslist(); | |
65 | #endif // LPP_APB_FUNCTIONS_H |
|
67 | #endif // LPP_APB_FUNCTIONS_H |
1 | NO CONTENT: file was removed, binary diff hidden |
|
NO CONTENT: file was removed, binary diff hidden |
1 | NO CONTENT: file was removed, binary diff hidden |
|
NO CONTENT: file was removed, binary diff hidden |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now