@@ -0,0 +1,60 | |||||
|
1 | /*------------------------------------------------------------------------------ | |||
|
2 | -- This file is a part of the LPP VHDL IP LIBRARY | |||
|
3 | -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS | |||
|
4 | -- | |||
|
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 | |||
|
7 | -- the Free Software Foundation; either version 3 of the License, or | |||
|
8 | -- (at your option) any later version. | |||
|
9 | -- | |||
|
10 | -- This program is distributed in the hope that it will be useful, | |||
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
13 | -- GNU General Public License for more details. | |||
|
14 | -- | |||
|
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 | |||
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
|
18 | ------------------------------------------------------------------------------- | |||
|
19 | -- Author : Martin Morlot | |||
|
20 | -- Mail : martin.morlot@lpp.polytechnique.fr | |||
|
21 | -----------------------------------------------------------------------------*/ | |||
|
22 | #ifndef APB_CNA_DRIVER_H | |||
|
23 | #define APB_CNA_DRIVER_H | |||
|
24 | ||||
|
25 | #define DAC_ready 3 | |||
|
26 | #define DAC_enable 1 | |||
|
27 | #define DAC_disable 0 | |||
|
28 | ||||
|
29 | ||||
|
30 | /*=================================================== | |||
|
31 | T Y P E S D E F | |||
|
32 | ====================================================*/ | |||
|
33 | ||||
|
34 | /** Structure repr�sentant le registre du CNA */ | |||
|
35 | struct DAC_Driver | |||
|
36 | { | |||
|
37 | int configReg; /**< Registre de configuration: Flag Ready [1] ; Flag Enable [0] */ | |||
|
38 | int dataReg; /**< Registre de donn�e sur 16 bits */ | |||
|
39 | }; | |||
|
40 | ||||
|
41 | typedef struct DAC_Driver DAC_Device; | |||
|
42 | ||||
|
43 | /*=================================================== | |||
|
44 | F U N C T I O N S | |||
|
45 | ====================================================*/ | |||
|
46 | ||||
|
47 | /** Ouvre l'acc� au CNA */ | |||
|
48 | DAC_Device* DacOpen(int count); | |||
|
49 | ||||
|
50 | //DAC_Device* DacClose(int count); | |||
|
51 | ||||
|
52 | /** Les donn�es sont lus a partir d'un tableau pour obtenir le signal de CAL (10Khz + 625hz) */ | |||
|
53 | int DacTable(); | |||
|
54 | ||||
|
55 | /** Les donn�es sont entr�e par l'utilisateur, la conversion se fait a chaque nouvelle donn�e */ | |||
|
56 | int DacConst(); | |||
|
57 | ||||
|
58 | ||||
|
59 | ||||
|
60 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now