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