]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h
staging: comedi: hwdrv_apci3200: remove forward declarations
[karo-tx-linux.git] / drivers / staging / comedi / drivers / addi-data / hwdrv_apci3200.h
1 /*
2  * Copyright (C) 2004,2005  ADDI-DATA GmbH for the source code of this module.
3  *
4  *      ADDI-DATA GmbH
5  *      Dieselstrasse 3
6  *      D-77833 Ottersweier
7  *      Tel: +19(0)7223/9493-0
8  *      Fax: +49(0)7223/9493-92
9  *      http://www.addi-data.com
10  *      info@addi-data.com
11  *
12  * This program is free software; you can redistribute it and/or modify it
13  * under the terms of the GNU General Public License as published by the Free
14  * Software Foundation; either version 2 of the License, or (at your option)
15  * any later version.
16  */
17
18 /* Card Specific information */
19 /* #define APCI3200_ADDRESS_RANGE                   264 */
20
21 int MODULE_NO;
22 struct {
23         int i_Gain;
24         int i_Polarity;
25         int i_OffsetRange;
26         int i_Coupling;
27         int i_SingleDiff;
28         int i_AutoCalibration;
29         unsigned int ui_ReloadValue;
30         unsigned int ui_TimeUnitReloadVal;
31         int i_Interrupt;
32         int i_ModuleSelection;
33 } Config_Parameters_Module1, Config_Parameters_Module2,
34     Config_Parameters_Module3, Config_Parameters_Module4;
35
36 /* ANALOG INPUT RANGE */
37 static const struct comedi_lrange range_apci3200_ai = { 8, {
38                                                      BIP_RANGE(10),
39                                                      BIP_RANGE(5),
40                                                      BIP_RANGE(2),
41                                                      BIP_RANGE(1),
42                                                      UNI_RANGE(10),
43                                                      UNI_RANGE(5),
44                                                      UNI_RANGE(2),
45                                                      UNI_RANGE(1)
46                                                      }
47 };
48
49 static const struct comedi_lrange range_apci3300_ai = { 4, {
50                                                      UNI_RANGE(10),
51                                                      UNI_RANGE(5),
52                                                      UNI_RANGE(2),
53                                                      UNI_RANGE(1)
54                                                      }
55 };
56
57 /* Analog Input related Defines */
58 #define APCI3200_AI_OFFSET_GAIN                  0
59 #define APCI3200_AI_SC_TEST                      4
60 #define APCI3200_AI_IRQ                          8
61 #define APCI3200_AI_AUTOCAL                      12
62 #define APCI3200_RELOAD_CONV_TIME_VAL            32
63 #define APCI3200_CONV_TIME_TIME_BASE             36
64 #define APCI3200_RELOAD_DELAY_TIME_VAL           40
65 #define APCI3200_DELAY_TIME_TIME_BASE            44
66 #define APCI3200_AI_MODULE1                      0
67 #define APCI3200_AI_MODULE2                      64
68 #define APCI3200_AI_MODULE3                      128
69 #define APCI3200_AI_MODULE4                      192
70 #define TRUE                                     1
71 #define FALSE                                    0
72 #define APCI3200_AI_EOSIRQ                       16
73 #define APCI3200_AI_EOS                          20
74 #define APCI3200_AI_CHAN_ID                      24
75 #define APCI3200_AI_CHAN_VAL                     28
76 #define ANALOG_INPUT                             0
77 #define TEMPERATURE                              1
78 #define RESISTANCE                               2
79
80 #define ENABLE_EXT_TRIG                          1
81 #define ENABLE_EXT_GATE                          2
82 #define ENABLE_EXT_TRIG_GATE                     3
83
84 #define APCI3200_MAXVOLT                         2.5
85 #define ADDIDATA_GREATER_THAN_TEST               0
86 #define ADDIDATA_LESS_THAN_TEST                  1
87
88 #define ADDIDATA_UNIPOLAR                        1
89 #define ADDIDATA_BIPOLAR                         2
90
91 /* BEGIN JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values */
92 #define MAX_MODULE                              4
93 /* END JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values */
94
95 struct str_ADDIDATA_RTDStruct {
96         unsigned int ul_NumberOfValue;
97         unsigned int *pul_ResistanceValue;
98         unsigned int *pul_TemperatureValue;
99 };
100
101 /* BEGIN JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values */
102 struct str_Module {
103
104         /*  Begin JK 05/08/2003 change for Linux */
105         unsigned long ul_CurrentSourceCJC;
106         unsigned long ul_CurrentSource[5];
107         /*  End JK 05/08/2003 change for Linux */
108
109         /*  Begin CG 15/02/02 Rev 1.0 -> Rev 1.1 : Add Header Type 1 */
110         unsigned long ul_GainFactor[8]; /*  Gain Factor */
111         unsigned int w_GainValue[10];
112         /*  End CG 15/02/02 Rev 1.0 -> Rev 1.1 : Add Header Type 1 */
113 };
114
115 /* END JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values */
116
117 /* BEGIN JK 06.07.04: Management of sevrals boards */
118 struct str_BoardInfos {
119
120         int i_CJCAvailable;
121         int i_CJCPolarity;
122         int i_CJCGain;
123         int i_InterruptFlag;
124         int i_ADDIDATAPolarity;
125         int i_ADDIDATAGain;
126         int i_AutoCalibration;
127         int i_ADDIDATAConversionTime;
128         int i_ADDIDATAConversionTimeUnit;
129         int i_ADDIDATAType;
130         int i_ChannelNo;
131         int i_ChannelCount;
132         int i_ScanType;
133         int i_FirstChannel;
134         int i_LastChannel;
135         int i_Sum;
136         int i_Offset;
137         unsigned int ui_Channel_num;
138         int i_Count;
139         int i_Initialised;
140         /* UINT ui_InterruptChannelValue[96]; //Buffer */
141         unsigned int ui_InterruptChannelValue[144];     /* Buffer */
142         unsigned char b_StructInitialized;
143         /* Begin JK 19.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68 */
144         unsigned int ui_ScanValueArray[7 + 12]; /*  7 is the maximal number of channels */
145         /* End JK 19.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68 */
146
147         /* Begin JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values */
148         int i_ConnectionType;
149         int i_NbrOfModule;
150         struct str_Module s_Module[MAX_MODULE];
151         /* End JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values */
152 };
153
154 /* END JK 06.07.04: Management of sevrals boards */