]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/staging/comedi/drivers/ni_stc.h
3d1fd9b08684b134303b2354d0002d727cf3b1c7
[mirror_ubuntu-artful-kernel.git] / drivers / staging / comedi / drivers / ni_stc.h
1 /*
2 module/ni_stc.h
3 Register descriptions for NI DAQ-STC chip
4
5 COMEDI - Linux Control and Measurement Device Interface
6 Copyright (C) 1998-9 David A. Schleef <ds@schleef.org>
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 */
18
19 /*
20 References:
21 DAQ-STC Technical Reference Manual
22 */
23
24 #ifndef _COMEDI_NI_STC_H
25 #define _COMEDI_NI_STC_H
26
27 #include "ni_tio.h"
28
29 #define NUM_PFI_OUTPUT_SELECT_REGS 6
30
31 /*
32 * Registers in the National Instruments DAQ-STC chip
33 */
34
35 #define NISTC_INTA_ACK_REG 2
36 #define NISTC_INTA_ACK_G0_GATE BIT(15)
37 #define NISTC_INTA_ACK_G0_TC BIT(14)
38 #define NISTC_INTA_ACK_AI_ERR BIT(13)
39 #define NISTC_INTA_ACK_AI_STOP BIT(12)
40 #define NISTC_INTA_ACK_AI_START BIT(11)
41 #define NISTC_INTA_ACK_AI_START2 BIT(10)
42 #define NISTC_INTA_ACK_AI_START1 BIT(9)
43 #define NISTC_INTA_ACK_AI_SC_TC BIT(8)
44 #define NISTC_INTA_ACK_AI_SC_TC_ERR BIT(7)
45 #define NISTC_INTA_ACK_G0_TC_ERR BIT(6)
46 #define NISTC_INTA_ACK_G0_GATE_ERR BIT(5)
47 #define NISTC_INTA_ACK_AI_ALL (NISTC_INTA_ACK_AI_ERR | \
48 NISTC_INTA_ACK_AI_STOP | \
49 NISTC_INTA_ACK_AI_START | \
50 NISTC_INTA_ACK_AI_START2 | \
51 NISTC_INTA_ACK_AI_START1 | \
52 NISTC_INTA_ACK_AI_SC_TC | \
53 NISTC_INTA_ACK_AI_SC_TC_ERR)
54
55 #define NISTC_INTB_ACK_REG 3
56 #define NISTC_INTB_ACK_G1_GATE BIT(15)
57 #define NISTC_INTB_ACK_G1_TC BIT(14)
58 #define NISTC_INTB_ACK_AO_ERR BIT(13)
59 #define NISTC_INTB_ACK_AO_STOP BIT(12)
60 #define NISTC_INTB_ACK_AO_START BIT(11)
61 #define NISTC_INTB_ACK_AO_UPDATE BIT(10)
62 #define NISTC_INTB_ACK_AO_START1 BIT(9)
63 #define NISTC_INTB_ACK_AO_BC_TC BIT(8)
64 #define NISTC_INTB_ACK_AO_UC_TC BIT(7)
65 #define NISTC_INTB_ACK_AO_UI2_TC BIT(6)
66 #define NISTC_INTB_ACK_AO_UI2_TC_ERR BIT(5)
67 #define NISTC_INTB_ACK_AO_BC_TC_ERR BIT(4)
68 #define NISTC_INTB_ACK_AO_BC_TC_TRIG_ERR BIT(3)
69 #define NISTC_INTB_ACK_G1_TC_ERR BIT(2)
70 #define NISTC_INTB_ACK_G1_GATE_ERR BIT(1)
71 #define NISTC_INTB_ACK_AO_ALL (NISTC_INTB_ACK_AO_ERR | \
72 NISTC_INTB_ACK_AO_STOP | \
73 NISTC_INTB_ACK_AO_START | \
74 NISTC_INTB_ACK_AO_UPDATE | \
75 NISTC_INTB_ACK_AO_START1 | \
76 NISTC_INTB_ACK_AO_BC_TC | \
77 NISTC_INTB_ACK_AO_UC_TC | \
78 NISTC_INTB_ACK_AO_BC_TC_ERR | \
79 NISTC_INTB_ACK_AO_BC_TC_TRIG_ERR)
80
81 #define NISTC_AI_CMD2_REG 4
82 #define NISTC_AI_CMD2_END_ON_SC_TC BIT(15)
83 #define NISTC_AI_CMD2_END_ON_EOS BIT(14)
84 #define NISTC_AI_CMD2_START1_DISABLE BIT(11)
85 #define NISTC_AI_CMD2_SC_SAVE_TRACE BIT(10)
86 #define NISTC_AI_CMD2_SI_SW_ON_SC_TC BIT(9)
87 #define NISTC_AI_CMD2_SI_SW_ON_STOP BIT(8)
88 #define NISTC_AI_CMD2_SI_SW_ON_TC BIT(7)
89 #define NISTC_AI_CMD2_SC_SW_ON_TC BIT(4)
90 #define NISTC_AI_CMD2_STOP_PULSE BIT(3)
91 #define NISTC_AI_CMD2_START_PULSE BIT(2)
92 #define NISTC_AI_CMD2_START2_PULSE BIT(1)
93 #define NISTC_AI_CMD2_START1_PULSE BIT(0)
94
95 #define NISTC_AO_CMD2_REG 5
96 #define NISTC_AO_CMD2_END_ON_BC_TC(x) (((x) & 0x3) << 14)
97 #define NISTC_AO_CMD2_START_STOP_GATE_ENA BIT(13)
98 #define NISTC_AO_CMD2_UC_SAVE_TRACE BIT(12)
99 #define NISTC_AO_CMD2_BC_GATE_ENA BIT(11)
100 #define NISTC_AO_CMD2_BC_SAVE_TRACE BIT(10)
101 #define NISTC_AO_CMD2_UI_SW_ON_BC_TC BIT(9)
102 #define NISTC_AO_CMD2_UI_SW_ON_STOP BIT(8)
103 #define NISTC_AO_CMD2_UI_SW_ON_TC BIT(7)
104 #define NISTC_AO_CMD2_UC_SW_ON_BC_TC BIT(6)
105 #define NISTC_AO_CMD2_UC_SW_ON_TC BIT(5)
106 #define NISTC_AO_CMD2_BC_SW_ON_TC BIT(4)
107 #define NISTC_AO_CMD2_MUTE_B BIT(3)
108 #define NISTC_AO_CMD2_MUTE_A BIT(2)
109 #define NISTC_AO_CMD2_UPDATE2_PULSE BIT(1)
110 #define NISTC_AO_CMD2_START1_PULSE BIT(0)
111
112 #define NISTC_G0_CMD_REG 6
113 #define NISTC_G1_CMD_REG 7
114
115 #define NISTC_AI_CMD1_REG 8
116 #define NISTC_AI_CMD1_ATRIG_RESET BIT(14)
117 #define NISTC_AI_CMD1_DISARM BIT(13)
118 #define NISTC_AI_CMD1_SI2_ARM BIT(12)
119 #define NISTC_AI_CMD1_SI2_LOAD BIT(11)
120 #define NISTC_AI_CMD1_SI_ARM BIT(10)
121 #define NISTC_AI_CMD1_SI_LOAD BIT(9)
122 #define NISTC_AI_CMD1_DIV_ARM BIT(8)
123 #define NISTC_AI_CMD1_DIV_LOAD BIT(7)
124 #define NISTC_AI_CMD1_SC_ARM BIT(6)
125 #define NISTC_AI_CMD1_SC_LOAD BIT(5)
126 #define NISTC_AI_CMD1_SCAN_IN_PROG_PULSE BIT(4)
127 #define NISTC_AI_CMD1_EXTMUX_CLK_PULSE BIT(3)
128 #define NISTC_AI_CMD1_LOCALMUX_CLK_PULSE BIT(2)
129 #define NISTC_AI_CMD1_SC_TC_PULSE BIT(1)
130 #define NISTC_AI_CMD1_CONVERT_PULSE BIT(0)
131
132 #define NISTC_AO_CMD1_REG 9
133 #define NISTC_AO_CMD1_ATRIG_RESET BIT(15)
134 #define NISTC_AO_CMD1_START_PULSE BIT(14)
135 #define NISTC_AO_CMD1_DISARM BIT(13)
136 #define NISTC_AO_CMD1_UI2_ARM_DISARM BIT(12)
137 #define NISTC_AO_CMD1_UI2_LOAD BIT(11)
138 #define NISTC_AO_CMD1_UI_ARM BIT(10)
139 #define NISTC_AO_CMD1_UI_LOAD BIT(9)
140 #define NISTC_AO_CMD1_UC_ARM BIT(8)
141 #define NISTC_AO_CMD1_UC_LOAD BIT(7)
142 #define NISTC_AO_CMD1_BC_ARM BIT(6)
143 #define NISTC_AO_CMD1_BC_LOAD BIT(5)
144 #define NISTC_AO_CMD1_DAC1_UPDATE_MODE BIT(4)
145 #define NISTC_AO_CMD1_LDAC1_SRC_SEL BIT(3)
146 #define NISTC_AO_CMD1_DAC0_UPDATE_MODE BIT(2)
147 #define NISTC_AO_CMD1_LDAC0_SRC_SEL BIT(1)
148 #define NISTC_AO_CMD1_UPDATE_PULSE BIT(0)
149
150 #define NISTC_DIO_OUT_REG 10
151 #define NISTC_DIO_OUT_SERIAL(x) (((x) & 0xff) << 8)
152 #define NISTC_DIO_OUT_SERIAL_MASK NISTC_DIO_OUT_SERIAL(0xff)
153 #define NISTC_DIO_OUT_PARALLEL(x) ((x) & 0xff)
154 #define NISTC_DIO_OUT_PARALLEL_MASK NISTC_DIO_OUT_PARALLEL(0xff)
155 #define NISTC_DIO_SDIN BIT(4)
156 #define NISTC_DIO_SDOUT BIT(0)
157
158 #define NISTC_DIO_CTRL_REG 11
159 #define NISTC_DIO_SDCLK BIT(11)
160 #define NISTC_DIO_CTRL_HW_SER_TIMEBASE BIT(10)
161 #define NISTC_DIO_CTRL_HW_SER_ENA BIT(9)
162 #define NISTC_DIO_CTRL_HW_SER_START BIT(8)
163 #define NISTC_DIO_CTRL_DIR(x) ((x) & 0xff)
164 #define NISTC_DIO_CTRL_DIR_MASK NISTC_DIO_CTRL_DIR(0xff)
165
166 #define NISTC_AI_MODE1_REG 12
167 #define NISTC_AI_MODE1_CONVERT_SRC(x) (((x) & 0x1f) << 11)
168 #define NISTC_AI_MODE1_SI_SRC(x) (((x) & 0x1f) << 6)
169 #define NISTC_AI_MODE1_CONVERT_POLARITY BIT(5)
170 #define NISTC_AI_MODE1_SI_POLARITY BIT(4)
171 #define NISTC_AI_MODE1_START_STOP BIT(3)
172 #define NISTC_AI_MODE1_RSVD BIT(2)
173 #define NISTC_AI_MODE1_CONTINUOUS BIT(1)
174 #define NISTC_AI_MODE1_TRIGGER_ONCE BIT(0)
175
176 #define NISTC_AI_MODE2_REG 13
177 #define NISTC_AI_MODE2_SC_GATE_ENA BIT(15)
178 #define NISTC_AI_MODE2_START_STOP_GATE_ENA BIT(14)
179 #define NISTC_AI_MODE2_PRE_TRIGGER BIT(13)
180 #define NISTC_AI_MODE2_EXTMUX_PRESENT BIT(12)
181 #define NISTC_AI_MODE2_SI2_INIT_LOAD_SRC BIT(9)
182 #define NISTC_AI_MODE2_SI2_RELOAD_MODE BIT(8)
183 #define NISTC_AI_MODE2_SI_INIT_LOAD_SRC BIT(7)
184 #define NISTC_AI_MODE2_SI_RELOAD_MODE(x) (((x) & 0x7) << 4)
185 #define NISTC_AI_MODE2_SI_WR_SWITCH BIT(3)
186 #define NISTC_AI_MODE2_SC_INIT_LOAD_SRC BIT(2)
187 #define NISTC_AI_MODE2_SC_RELOAD_MODE BIT(1)
188 #define NISTC_AI_MODE2_SC_WR_SWITCH BIT(0)
189
190 #define NISTC_AI_SI_LOADA_REG 14
191 #define NISTC_AI_SI_LOADB_REG 16
192 #define NISTC_AI_SC_LOADA_REG 18
193 #define NISTC_AI_SC_LOADB_REG 20
194 #define NISTC_AI_SI2_LOADA_REG 23
195 #define NISTC_AI_SI2_LOADB_REG 25
196
197 #define NISTC_G0_MODE_REG 26
198 #define NISTC_G1_MODE_REG 27
199 #define NISTC_G0_LOADA_REG 28
200 #define NISTC_G0_LOADB_REG 30
201 #define NISTC_G1_LOADA_REG 32
202 #define NISTC_G1_LOADB_REG 34
203 #define NISTC_G0_INPUT_SEL_REG 36
204 #define NISTC_G1_INPUT_SEL_REG 37
205
206 #define NISTC_AO_MODE1_REG 38
207 #define NISTC_AO_MODE1_UPDATE_SRC(x) (((x) & 0x1f) << 11)
208 #define NISTC_AO_MODE1_UPDATE_SRC_MASK NISTC_AO_MODE1_UPDATE_SRC(0x1f)
209 #define NISTC_AO_MODE1_UI_SRC(x) (((x) & 0x1f) << 6)
210 #define NISTC_AO_MODE1_UI_SRC_MASK NISTC_AO_MODE1_UI_SRC(0x1f)
211 #define NISTC_AO_MODE1_MULTI_CHAN BIT(5)
212 #define NISTC_AO_MODE1_UPDATE_SRC_POLARITY BIT(4)
213 #define NISTC_AO_MODE1_UI_SRC_POLARITY BIT(3)
214 #define NISTC_AO_MODE1_UC_SW_EVERY_TC BIT(2)
215 #define NISTC_AO_MODE1_CONTINUOUS BIT(1)
216 #define NISTC_AO_MODE1_TRIGGER_ONCE BIT(0)
217
218 #define NISTC_AO_MODE2_REG 39
219 #define NISTC_AO_MODE2_FIFO_MODE(x) (((x) & 0x3) << 14)
220 #define NISTC_AO_MODE2_FIFO_MODE_MASK NISTC_AO_MODE2_FIFO_MODE(3)
221 #define NISTC_AO_MODE2_FIFO_MODE_E NISTC_AO_MODE2_FIFO_MODE(0)
222 #define NISTC_AO_MODE2_FIFO_MODE_HF NISTC_AO_MODE2_FIFO_MODE(1)
223 #define NISTC_AO_MODE2_FIFO_MODE_F NISTC_AO_MODE2_FIFO_MODE(2)
224 #define NISTC_AO_MODE2_FIFO_MODE_HF_F NISTC_AO_MODE2_FIFO_MODE(3)
225 #define NISTC_AO_MODE2_FIFO_REXMIT_ENA BIT(13)
226 #define NISTC_AO_MODE2_START1_DISABLE BIT(12)
227 #define NISTC_AO_MODE2_UC_INIT_LOAD_SRC BIT(11)
228 #define NISTC_AO_MODE2_UC_WR_SWITCH BIT(10)
229 #define NISTC_AO_MODE2_UI2_INIT_LOAD_SRC BIT(9)
230 #define NISTC_AO_MODE2_UI2_RELOAD_MODE BIT(8)
231 #define NISTC_AO_MODE2_UI_INIT_LOAD_SRC BIT(7)
232 #define NISTC_AO_MODE2_UI_RELOAD_MODE(x) (((x) & 0x7) << 4)
233 #define NISTC_AO_MODE2_UI_WR_SWITCH BIT(3)
234 #define NISTC_AO_MODE2_BC_INIT_LOAD_SRC BIT(2)
235 #define NISTC_AO_MODE2_BC_RELOAD_MODE BIT(1)
236 #define NISTC_AO_MODE2_BC_WR_SWITCH BIT(0)
237
238 #define NISTC_AO_UI_LOADA_REG 40
239 #define NISTC_AO_UI_LOADB_REG 42
240 #define NISTC_AO_BC_LOADA_REG 44
241 #define NISTC_AO_BC_LOADB_REG 46
242 #define NISTC_AO_UC_LOADA_REG 48
243 #define NISTC_AO_UC_LOADB_REG 50
244
245 #define NISTC_CLK_FOUT_REG 56
246 #define NISTC_CLK_FOUT_ENA BIT(15)
247 #define NISTC_CLK_FOUT_TIMEBASE_SEL BIT(14)
248 #define NISTC_CLK_FOUT_DIO_SER_OUT_DIV2 BIT(13)
249 #define NISTC_CLK_FOUT_SLOW_DIV2 BIT(12)
250 #define NISTC_CLK_FOUT_SLOW_TIMEBASE BIT(11)
251 #define NISTC_CLK_FOUT_G_SRC_DIV2 BIT(10)
252 #define NISTC_CLK_FOUT_TO_BOARD_DIV2 BIT(9)
253 #define NISTC_CLK_FOUT_TO_BOARD BIT(8)
254 #define NISTC_CLK_FOUT_AI_OUT_DIV2 BIT(7)
255 #define NISTC_CLK_FOUT_AI_SRC_DIV2 BIT(6)
256 #define NISTC_CLK_FOUT_AO_OUT_DIV2 BIT(5)
257 #define NISTC_CLK_FOUT_AO_SRC_DIV2 BIT(4)
258 #define NISTC_CLK_FOUT_DIVIDER(x) (((x) & 0xf) << 0)
259 #define NISTC_CLK_FOUT_TO_DIVIDER(x) (((x) >> 0) & 0xf)
260 #define NISTC_CLK_FOUT_DIVIDER_MASK NISTC_CLK_FOUT_DIVIDER(0xf)
261
262 #define NISTC_IO_BIDIR_PIN_REG 57
263
264 #define NISTC_RTSI_TRIG_DIR_REG 58
265 #define NISTC_RTSI_TRIG_OLD_CLK_CHAN 7
266 #define NISTC_RTSI_TRIG_NUM_CHAN(_m) ((_m) ? 8 : 7)
267 #define NISTC_RTSI_TRIG_DIR(_c, _m) ((_m) ? BIT(8 + (_c)) : BIT(7 + (_c)))
268 #define NISTC_RTSI_TRIG_USE_CLK BIT(1)
269 #define NISTC_RTSI_TRIG_DRV_CLK BIT(0)
270
271 #define NISTC_INT_CTRL_REG 59
272 #define NISTC_INT_CTRL_INTB_ENA BIT(15)
273 #define NISTC_INT_CTRL_INTB_SEL(x) (((x) & 0x7) << 12)
274 #define NISTC_INT_CTRL_INTA_ENA BIT(11)
275 #define NISTC_INT_CTRL_INTA_SEL(x) (((x) & 0x7) << 8)
276 #define NISTC_INT_CTRL_PASSTHRU0_POL BIT(3)
277 #define NISTC_INT_CTRL_PASSTHRU1_POL BIT(2)
278 #define NISTC_INT_CTRL_3PIN_INT BIT(1)
279 #define NISTC_INT_CTRL_INT_POL BIT(0)
280
281 #define NISTC_AI_OUT_CTRL_REG 60
282 #define NISTC_AI_OUT_CTRL_START_SEL BIT(10)
283 #define NISTC_AI_OUT_CTRL_SCAN_IN_PROG_SEL(x) (((x) & 0x3) << 8)
284 #define NISTC_AI_OUT_CTRL_EXTMUX_CLK_SEL(x) (((x) & 0x3) << 6)
285 #define NISTC_AI_OUT_CTRL_LOCALMUX_CLK_SEL(x) (((x) & 0x3) << 4)
286 #define NISTC_AI_OUT_CTRL_SC_TC_SEL(x) (((x) & 0x3) << 2)
287 #define NISTC_AI_OUT_CTRL_CONVERT_SEL(x) (((x) & 0x3) << 0)
288 #define NISTC_AI_OUT_CTRL_CONVERT_HIGH_Z NISTC_AI_OUT_CTRL_CONVERT_SEL(0)
289 #define NISTC_AI_OUT_CTRL_CONVERT_GND NISTC_AI_OUT_CTRL_CONVERT_SEL(1)
290 #define NISTC_AI_OUT_CTRL_CONVERT_LOW NISTC_AI_OUT_CTRL_CONVERT_SEL(2)
291 #define NISTC_AI_OUT_CTRL_CONVERT_HIGH NISTC_AI_OUT_CTRL_CONVERT_SEL(3)
292
293 #define NISTC_ATRIG_ETC_REG 61
294 #define NISTC_ATRIG_ETC_GPFO_1_ENA BIT(15)
295 #define NISTC_ATRIG_ETC_GPFO_0_ENA BIT(14)
296 #define NISTC_ATRIG_ETC_GPFO_0_SEL(x) (((x) & 0x3) << 11)
297 #define NISTC_ATRIG_ETC_GPFO_1_SEL BIT(7)
298 #define NISTC_ATRIG_ETC_DRV BIT(4)
299 #define NISTC_ATRIG_ETC_ENA BIT(3)
300 #define NISTC_ATRIG_ETC_MODE(x) (((x) & 0x7) << 0)
301
302 #define NISTC_AI_START_STOP_REG 62
303 #define NISTC_AI_START_POLARITY BIT(15)
304 #define NISTC_AI_STOP_POLARITY BIT(14)
305 #define NISTC_AI_STOP_SYNC BIT(13)
306 #define NISTC_AI_STOP_EDGE BIT(12)
307 #define NISTC_AI_STOP_SEL(x) (((x) & 0x1f) << 7)
308 #define NISTC_AI_START_SYNC BIT(6)
309 #define NISTC_AI_START_EDGE BIT(5)
310 #define NISTC_AI_START_SEL(x) (((x) & 0x1f) << 0)
311
312 #define NISTC_AI_TRIG_SEL_REG 63
313 #define NISTC_AI_TRIG_START1_POLARITY BIT(15)
314 #define NISTC_AI_TRIG_START2_POLARITY BIT(14)
315 #define NISTC_AI_TRIG_START2_SYNC BIT(13)
316 #define NISTC_AI_TRIG_START2_EDGE BIT(12)
317 #define NISTC_AI_TRIG_START2_SEL(x) (((x) & 0x1f) << 7)
318 #define NISTC_AI_TRIG_START1_SYNC BIT(6)
319 #define NISTC_AI_TRIG_START1_EDGE BIT(5)
320 #define NISTC_AI_TRIG_START1_SEL(x) (((x) & 0x1f) << 0)
321
322 #define NISTC_AI_DIV_LOADA_REG 64
323
324 #define NISTC_AO_START_SEL_REG 66
325 #define NISTC_AO_START_UI2_SW_GATE BIT(15)
326 #define NISTC_AO_START_UI2_EXT_GATE_POL BIT(14)
327 #define NISTC_AO_START_POLARITY BIT(13)
328 #define NISTC_AO_START_AOFREQ_ENA BIT(12)
329 #define NISTC_AO_START_UI2_EXT_GATE_SEL(x) (((x) & 0x1f) << 7)
330 #define NISTC_AO_START_SYNC BIT(6)
331 #define NISTC_AO_START_EDGE BIT(5)
332 #define NISTC_AO_START_SEL(x) (((x) & 0x1f) << 0)
333
334 #define NISTC_AO_TRIG_SEL_REG 67
335 #define NISTC_AO_TRIG_UI2_EXT_GATE_ENA BIT(15)
336 #define NISTC_AO_TRIG_DELAYED_START1 BIT(14)
337 #define NISTC_AO_TRIG_START1_POLARITY BIT(13)
338 #define NISTC_AO_TRIG_UI2_SRC_POLARITY BIT(12)
339 #define NISTC_AO_TRIG_UI2_SRC_SEL(x) (((x) & 0x1f) << 7)
340 #define NISTC_AO_TRIG_START1_SYNC BIT(6)
341 #define NISTC_AO_TRIG_START1_EDGE BIT(5)
342 #define NISTC_AO_TRIG_START1_SEL(x) (((x) & 0x1f) << 0)
343 #define NISTC_AO_TRIG_START1_SEL_MASK NISTC_AO_TRIG_START1_SEL(0x1f)
344
345 #define NISTC_G0_AUTOINC_REG 68
346 #define NISTC_G1_AUTOINC_REG 69
347
348 #define NISTC_AO_MODE3_REG 70
349 #define NISTC_AO_MODE3_UI2_SW_NEXT_TC BIT(13)
350 #define NISTC_AO_MODE3_UC_SW_EVERY_BC_TC BIT(12)
351 #define NISTC_AO_MODE3_TRIG_LEN BIT(11)
352 #define NISTC_AO_MODE3_STOP_ON_OVERRUN_ERR BIT(5)
353 #define NISTC_AO_MODE3_STOP_ON_BC_TC_TRIG_ERR BIT(4)
354 #define NISTC_AO_MODE3_STOP_ON_BC_TC_ERR BIT(3)
355 #define NISTC_AO_MODE3_NOT_AN_UPDATE BIT(2)
356 #define NISTC_AO_MODE3_SW_GATE BIT(1)
357 #define NISTC_AO_MODE3_LAST_GATE_DISABLE BIT(0) /* M-Series only */
358
359 #define NISTC_RESET_REG 72
360 #define NISTC_RESET_SOFTWARE BIT(11)
361 #define NISTC_RESET_AO_CFG_END BIT(9)
362 #define NISTC_RESET_AI_CFG_END BIT(8)
363 #define NISTC_RESET_AO_CFG_START BIT(5)
364 #define NISTC_RESET_AI_CFG_START BIT(4)
365 #define NISTC_RESET_G1 BIT(3)
366 #define NISTC_RESET_G0 BIT(2)
367 #define NISTC_RESET_AO BIT(1)
368 #define NISTC_RESET_AI BIT(0)
369
370 #define NISTC_INTA_ENA_REG 73
371 #define NISTC_INTA2_ENA_REG 74
372 #define NISTC_INTA_ENA_PASSTHRU0 BIT(9)
373 #define NISTC_INTA_ENA_G0_GATE BIT(8)
374 #define NISTC_INTA_ENA_AI_FIFO BIT(7)
375 #define NISTC_INTA_ENA_G0_TC BIT(6)
376 #define NISTC_INTA_ENA_AI_ERR BIT(5)
377 #define NISTC_INTA_ENA_AI_STOP BIT(4)
378 #define NISTC_INTA_ENA_AI_START BIT(3)
379 #define NISTC_INTA_ENA_AI_START2 BIT(2)
380 #define NISTC_INTA_ENA_AI_START1 BIT(1)
381 #define NISTC_INTA_ENA_AI_SC_TC BIT(0)
382 #define NISTC_INTA_ENA_AI_MASK (NISTC_INTA_ENA_AI_FIFO | \
383 NISTC_INTA_ENA_AI_ERR | \
384 NISTC_INTA_ENA_AI_STOP | \
385 NISTC_INTA_ENA_AI_START | \
386 NISTC_INTA_ENA_AI_START2 | \
387 NISTC_INTA_ENA_AI_START1 | \
388 NISTC_INTA_ENA_AI_SC_TC)
389
390 #define NISTC_INTB_ENA_REG 75
391 #define NISTC_INTB2_ENA_REG 76
392 #define NISTC_INTB_ENA_PASSTHRU1 BIT(11)
393 #define NISTC_INTB_ENA_G1_GATE BIT(10)
394 #define NISTC_INTB_ENA_G1_TC BIT(9)
395 #define NISTC_INTB_ENA_AO_FIFO BIT(8)
396 #define NISTC_INTB_ENA_AO_UI2_TC BIT(7)
397 #define NISTC_INTB_ENA_AO_UC_TC BIT(6)
398 #define NISTC_INTB_ENA_AO_ERR BIT(5)
399 #define NISTC_INTB_ENA_AO_STOP BIT(4)
400 #define NISTC_INTB_ENA_AO_START BIT(3)
401 #define NISTC_INTB_ENA_AO_UPDATE BIT(2)
402 #define NISTC_INTB_ENA_AO_START1 BIT(1)
403 #define NISTC_INTB_ENA_AO_BC_TC BIT(0)
404
405 #define NISTC_AI_PERSONAL_REG 77
406 #define NISTC_AI_PERSONAL_SHIFTIN_PW BIT(15)
407 #define NISTC_AI_PERSONAL_EOC_POLARITY BIT(14)
408 #define NISTC_AI_PERSONAL_SOC_POLARITY BIT(13)
409 #define NISTC_AI_PERSONAL_SHIFTIN_POL BIT(12)
410 #define NISTC_AI_PERSONAL_CONVERT_TIMEBASE BIT(11)
411 #define NISTC_AI_PERSONAL_CONVERT_PW BIT(10)
412 #define NISTC_AI_PERSONAL_CONVERT_ORIG_PULSE BIT(9)
413 #define NISTC_AI_PERSONAL_FIFO_FLAGS_POL BIT(8)
414 #define NISTC_AI_PERSONAL_OVERRUN_MODE BIT(7)
415 #define NISTC_AI_PERSONAL_EXTMUX_CLK_PW BIT(6)
416 #define NISTC_AI_PERSONAL_LOCALMUX_CLK_PW BIT(5)
417 #define NISTC_AI_PERSONAL_AIFREQ_POL BIT(4)
418
419 #define NISTC_AO_PERSONAL_REG 78
420 #define NISTC_AO_PERSONAL_MULTI_DACS BIT(15) /* M-Series only */
421 #define NISTC_AO_PERSONAL_NUM_DAC BIT(14) /* 1:single; 0:dual */
422 #define NISTC_AO_PERSONAL_FAST_CPU BIT(13) /* M-Series reserved */
423 #define NISTC_AO_PERSONAL_TMRDACWR_PW BIT(12)
424 #define NISTC_AO_PERSONAL_FIFO_FLAGS_POL BIT(11) /* M-Series reserved */
425 #define NISTC_AO_PERSONAL_FIFO_ENA BIT(10)
426 #define NISTC_AO_PERSONAL_AOFREQ_POL BIT(9) /* M-Series reserved */
427 #define NISTC_AO_PERSONAL_DMA_PIO_CTRL BIT(8) /* M-Series reserved */
428 #define NISTC_AO_PERSONAL_UPDATE_ORIG_PULSE BIT(7)
429 #define NISTC_AO_PERSONAL_UPDATE_TIMEBASE BIT(6)
430 #define NISTC_AO_PERSONAL_UPDATE_PW BIT(5)
431 #define NISTC_AO_PERSONAL_BC_SRC_SEL BIT(4)
432 #define NISTC_AO_PERSONAL_INTERVAL_BUFFER_MODE BIT(3)
433
434 #define NISTC_RTSI_TRIGA_OUT_REG 79
435 #define NISTC_RTSI_TRIGB_OUT_REG 80
436 #define NISTC_RTSI_TRIGB_SUB_SEL1 BIT(15) /* not for M-Series */
437 #define NISTC_RTSI_TRIG(_c, _s) (((_s) & 0xf) << (((_c) % 4) * 4))
438 #define NISTC_RTSI_TRIG_MASK(_c) NISTC_RTSI_TRIG((_c), 0xf)
439 #define NISTC_RTSI_TRIG_TO_SRC(_c, _b) (((_b) >> (((_c) % 4) * 4)) & 0xf)
440
441 #define NISTC_RTSI_BOARD_REG 81
442
443 #define NISTC_CFG_MEM_CLR_REG 82
444 #define NISTC_ADC_FIFO_CLR_REG 83
445 #define NISTC_DAC_FIFO_CLR_REG 84
446 #define NISTC_WR_STROBE3_REG 85
447
448 #define NISTC_AO_OUT_CTRL_REG 86
449 #define NISTC_AO_OUT_CTRL_EXT_GATE_ENA BIT(15)
450 #define NISTC_AO_OUT_CTRL_EXT_GATE_SEL(x) (((x) & 0x1f) << 10)
451 #define NISTC_AO_OUT_CTRL_CHANS(x) (((x) & 0xf) << 6)
452 #define NISTC_AO_OUT_CTRL_UPDATE2_SEL(x) (((x) & 0x3) << 4)
453 #define NISTC_AO_OUT_CTRL_EXT_GATE_POL BIT(3)
454 #define NISTC_AO_OUT_CTRL_UPDATE2_TOGGLE BIT(2)
455 #define NISTC_AO_OUT_CTRL_UPDATE_SEL(x) (((x) & 0x3) << 0)
456 #define NISTC_AO_OUT_CTRL_UPDATE_SEL_HIGHZ NISTC_AO_OUT_CTRL_UPDATE_SEL(0)
457 #define NISTC_AO_OUT_CTRL_UPDATE_SEL_GND NISTC_AO_OUT_CTRL_UPDATE_SEL(1)
458 #define NISTC_AO_OUT_CTRL_UPDATE_SEL_LOW NISTC_AO_OUT_CTRL_UPDATE_SEL(2)
459 #define NISTC_AO_OUT_CTRL_UPDATE_SEL_HIGH NISTC_AO_OUT_CTRL_UPDATE_SEL(3)
460
461 #define NISTC_AI_MODE3_REG 87
462 #define NISTC_AI_MODE3_TRIG_LEN BIT(15)
463 #define NISTC_AI_MODE3_DELAY_START BIT(14)
464 #define NISTC_AI_MODE3_SOFTWARE_GATE BIT(13)
465 #define NISTC_AI_MODE3_SI_TRIG_DELAY BIT(12)
466 #define NISTC_AI_MODE3_SI2_SRC_SEL BIT(11)
467 #define NISTC_AI_MODE3_DELAYED_START2 BIT(10)
468 #define NISTC_AI_MODE3_DELAYED_START1 BIT(9)
469 #define NISTC_AI_MODE3_EXT_GATE_MODE BIT(8)
470 #define NISTC_AI_MODE3_FIFO_MODE(x) (((x) & 0x3) << 6)
471 #define NISTC_AI_MODE3_FIFO_MODE_NE NISTC_AI_MODE3_FIFO_MODE(0)
472 #define NISTC_AI_MODE3_FIFO_MODE_HF NISTC_AI_MODE3_FIFO_MODE(1)
473 #define NISTC_AI_MODE3_FIFO_MODE_F NISTC_AI_MODE3_FIFO_MODE(2)
474 #define NISTC_AI_MODE3_FIFO_MODE_HF_E NISTC_AI_MODE3_FIFO_MODE(3)
475 #define NISTC_AI_MODE3_EXT_GATE_POL BIT(5)
476 #define NISTC_AI_MODE3_EXT_GATE_SEL(x) (((x) & 0x1f) << 0)
477
478 #define NISTC_AI_STATUS1_REG 2
479 #define NISTC_AI_STATUS1_INTA BIT(15)
480 #define NISTC_AI_STATUS1_FIFO_F BIT(14)
481 #define NISTC_AI_STATUS1_FIFO_HF BIT(13)
482 #define NISTC_AI_STATUS1_FIFO_E BIT(12)
483 #define NISTC_AI_STATUS1_OVERRUN BIT(11)
484 #define NISTC_AI_STATUS1_OVERFLOW BIT(10)
485 #define NISTC_AI_STATUS1_SC_TC_ERR BIT(9)
486 #define NISTC_AI_STATUS1_OVER (NISTC_AI_STATUS1_OVERRUN | \
487 NISTC_AI_STATUS1_OVERFLOW)
488 #define NISTC_AI_STATUS1_ERR (NISTC_AI_STATUS1_OVER | \
489 NISTC_AI_STATUS1_SC_TC_ERR)
490 #define NISTC_AI_STATUS1_START2 BIT(8)
491 #define NISTC_AI_STATUS1_START1 BIT(7)
492 #define NISTC_AI_STATUS1_SC_TC BIT(6)
493 #define NISTC_AI_STATUS1_START BIT(5)
494 #define NISTC_AI_STATUS1_STOP BIT(4)
495 #define NISTC_AI_STATUS1_G0_TC BIT(3)
496 #define NISTC_AI_STATUS1_G0_GATE BIT(2)
497 #define NISTC_AI_STATUS1_FIFO_REQ BIT(1)
498 #define NISTC_AI_STATUS1_PASSTHRU0 BIT(0)
499
500 #define NISTC_AO_STATUS1_REG 3
501 #define NISTC_AO_STATUS1_INTB BIT(15)
502 #define NISTC_AO_STATUS1_FIFO_F BIT(14)
503 #define NISTC_AO_STATUS1_FIFO_HF BIT(13)
504 #define NISTC_AO_STATUS1_FIFO_E BIT(12)
505 #define NISTC_AO_STATUS1_BC_TC_ERR BIT(11)
506 #define NISTC_AO_STATUS1_START BIT(10)
507 #define NISTC_AO_STATUS1_OVERRUN BIT(9)
508 #define NISTC_AO_STATUS1_START1 BIT(8)
509 #define NISTC_AO_STATUS1_BC_TC BIT(7)
510 #define NISTC_AO_STATUS1_UC_TC BIT(6)
511 #define NISTC_AO_STATUS1_UPDATE BIT(5)
512 #define NISTC_AO_STATUS1_UI2_TC BIT(4)
513 #define NISTC_AO_STATUS1_G1_TC BIT(3)
514 #define NISTC_AO_STATUS1_G1_GATE BIT(2)
515 #define NISTC_AO_STATUS1_FIFO_REQ BIT(1)
516 #define NISTC_AO_STATUS1_PASSTHRU1 BIT(0)
517
518 #define NISTC_G01_STATUS_REG 4
519
520 #define NISTC_AI_STATUS2_REG 5
521
522 #define NISTC_AO_STATUS2_REG 6
523
524 #define NISTC_DIO_IN_REG 7
525
526 #define NISTC_G0_HW_SAVE_REG 8
527 #define NISTC_G1_HW_SAVE_REG 10
528
529 #define NISTC_G0_SAVE_REG 12
530 #define NISTC_G1_SAVE_REG 14
531
532 #define NISTC_AO_UI_SAVE_REG 16
533 #define NISTC_AO_BC_SAVE_REG 18
534 #define NISTC_AO_UC_SAVE_REG 20
535
536 #define NISTC_STATUS1_REG 27
537 #define NISTC_STATUS1_SERIO_IN_PROG BIT(12)
538
539 #define NISTC_DIO_SERIAL_IN_REG 28
540
541 #define NISTC_STATUS2_REG 29
542 #define NISTC_STATUS2_AO_TMRDACWRS_IN_PROGRESS BIT(5)
543
544 #define NISTC_AI_SI_SAVE_REG 64
545 #define NISTC_AI_SC_SAVE_REG 66
546
547 /*
548 * PCI E Series Registers
549 */
550 #define NI_E_STC_WINDOW_ADDR_REG 0x00 /* rw16 */
551 #define NI_E_STC_WINDOW_DATA_REG 0x02 /* rw16 */
552
553 #define NI_E_STATUS_REG 0x01 /* r8 */
554 #define NI_E_STATUS_AI_FIFO_LOWER_NE BIT(3)
555 #define NI_E_STATUS_PROMOUT BIT(0)
556
557 #define NI_E_DMA_AI_AO_SEL_REG 0x09 /* w8 */
558 #define NI_E_DMA_AI_SEL(x) (((x) & 0xf) << 0)
559 #define NI_E_DMA_AI_SEL_MASK NI_E_DMA_AI_SEL(0xf)
560 #define NI_E_DMA_AO_SEL(x) (((x) & 0xf) << 4)
561 #define NI_E_DMA_AO_SEL_MASK NI_E_DMA_AO_SEL(0xf)
562
563 #define NI_E_DMA_G0_G1_SEL_REG 0x0b /* w8 */
564 #define NI_E_DMA_G0_G1_SEL(_g, _c) (((_c) & 0xf) << ((_g) * 4))
565 #define NI_E_DMA_G0_G1_SEL_MASK(_g) NI_E_DMA_G0_G1_SEL((_g), 0xf)
566
567 #define NI_E_SERIAL_CMD_REG 0x0d /* w8 */
568 #define NI_E_SERIAL_CMD_DAC_LD(x) BIT(3 + (x))
569 #define NI_E_SERIAL_CMD_EEPROM_CS BIT(2)
570 #define NI_E_SERIAL_CMD_SDATA BIT(1)
571 #define NI_E_SERIAL_CMD_SCLK BIT(0)
572
573 #define NI_E_MISC_CMD_REG 0x0f /* w8 */
574 #define NI_E_MISC_CMD_INTEXT_ATRIG(x) (((x) & 0x1) << 7)
575 #define NI_E_MISC_CMD_EXT_ATRIG NI_E_MISC_CMD_INTEXT_ATRIG(0)
576 #define NI_E_MISC_CMD_INT_ATRIG NI_E_MISC_CMD_INTEXT_ATRIG(1)
577
578 #define NI_E_AI_CFG_LO_REG 0x10 /* w16 */
579 #define NI_E_AI_CFG_LO_LAST_CHAN BIT(15)
580 #define NI_E_AI_CFG_LO_GEN_TRIG BIT(12)
581 #define NI_E_AI_CFG_LO_DITHER BIT(9)
582 #define NI_E_AI_CFG_LO_UNI BIT(8)
583 #define NI_E_AI_CFG_LO_GAIN(x) ((x) << 0)
584
585 #define NI_E_AI_CFG_HI_REG 0x12 /* w16 */
586 #define NI_E_AI_CFG_HI_TYPE(x) (((x) & 0x7) << 12)
587 #define NI_E_AI_CFG_HI_TYPE_DIFF NI_E_AI_CFG_HI_TYPE(1)
588 #define NI_E_AI_CFG_HI_TYPE_COMMON NI_E_AI_CFG_HI_TYPE(2)
589 #define NI_E_AI_CFG_HI_TYPE_GROUND NI_E_AI_CFG_HI_TYPE(3)
590 #define NI_E_AI_CFG_HI_AC_COUPLE BIT(11)
591 #define NI_E_AI_CFG_HI_CHAN(x) (((x) & 0x3f) << 0)
592
593 #define NI_E_AO_CFG_REG 0x16 /* w16 */
594 #define NI_E_AO_DACSEL(x) ((x) << 8)
595 #define NI_E_AO_GROUND_REF BIT(3)
596 #define NI_E_AO_EXT_REF BIT(2)
597 #define NI_E_AO_DEGLITCH BIT(1)
598 #define NI_E_AO_CFG_BIP BIT(0)
599
600 #define NI_E_DAC_DIRECT_DATA_REG(x) (0x18 + ((x) * 2)) /* w16 */
601
602 #define NI_E_8255_BASE 0x19 /* rw8 */
603
604 #define NI_E_AI_FIFO_DATA_REG 0x1c /* r16 */
605
606 #define NI_E_AO_FIFO_DATA_REG 0x1e /* w16 */
607
608 /*
609 * 611x registers (these boards differ from the e-series)
610 */
611 #define NI611X_MAGIC_REG 0x19 /* w8 (new) */
612 #define NI611X_CALIB_CHAN_SEL_REG 0x1a /* w16 (new) */
613 #define NI611X_AI_FIFO_DATA_REG 0x1c /* r32 (incompatible) */
614 #define NI611X_AI_FIFO_OFFSET_LOAD_REG 0x05 /* r8 (new) */
615 #define NI611X_AO_FIFO_DATA_REG 0x14 /* w32 (incompatible) */
616 #define NI611X_CAL_GAIN_SEL_REG 0x05 /* w8 (new) */
617
618 #define NI611X_AO_WINDOW_ADDR_REG 0x18
619 #define NI611X_AO_WINDOW_DATA_REG 0x1e
620
621 /*
622 * 6143 registers
623 */
624 #define NI6143_MAGIC_REG 0x19 /* w8 */
625 #define NI6143_DMA_G0_G1_SEL_REG 0x0b /* w8 */
626 #define NI6143_PIPELINE_DELAY_REG 0x1f /* w8 */
627 #define NI6143_EOC_SET_REG 0x1d /* w8 */
628 #define NI6143_DMA_AI_SEL_REG 0x09 /* w8 */
629 #define NI6143_AI_FIFO_DATA_REG 0x8c /* r32 */
630 #define NI6143_AI_FIFO_FLAG_REG 0x84 /* w32 */
631 #define NI6143_AI_FIFO_CTRL_REG 0x88 /* w32 */
632 #define NI6143_AI_FIFO_STATUS_REG 0x88 /* r32 */
633 #define NI6143_AI_FIFO_DMA_THRESH_REG 0x90 /* w32 */
634 #define NI6143_AI_FIFO_WORDS_AVAIL_REG 0x94 /* w32 */
635
636 #define NI6143_CALIB_CHAN_REG 0x42 /* w16 */
637 #define NI6143_CALIB_CHAN_RELAY_ON BIT(15)
638 #define NI6143_CALIB_CHAN_RELAY_OFF BIT(14)
639 #define NI6143_CALIB_CHAN(x) (((x) & 0xf) << 0)
640 #define NI6143_CALIB_CHAN_GND_GND NI6143_CALIB_CHAN(0) /* Offset Cal */
641 #define NI6143_CALIB_CHAN_2V5_GND NI6143_CALIB_CHAN(2) /* 2.5V ref */
642 #define NI6143_CALIB_CHAN_PWM_GND NI6143_CALIB_CHAN(5) /* +-5V Self Cal */
643 #define NI6143_CALIB_CHAN_2V5_PWM NI6143_CALIB_CHAN(10) /* PWM Cal */
644 #define NI6143_CALIB_CHAN_PWM_PWM NI6143_CALIB_CHAN(13) /* CMRR */
645 #define NI6143_CALIB_CHAN_GND_PWM NI6143_CALIB_CHAN(14) /* PWM Cal */
646 #define NI6143_CALIB_LO_TIME_REG 0x20 /* w16 */
647 #define NI6143_CALIB_HI_TIME_REG 0x22 /* w16 */
648 #define NI6143_RELAY_COUNTER_LOAD_REG 0x4c /* w32 */
649 #define NI6143_SIGNATURE_REG 0x50 /* w32 */
650 #define NI6143_RELEASE_DATE_REG 0x54 /* w32 */
651 #define NI6143_RELEASE_OLDEST_DATE_REG 0x58 /* w32 */
652
653 /* 671x, 611x registers */
654
655 /* 671xi, 611x windowed ao registers */
656 enum windowed_regs_67xx_61xx {
657 AO_Immediate_671x = 0x11, /* W 16 */
658 AO_Timed_611x = 0x10, /* W 16 */
659 AO_FIFO_Offset_Load_611x = 0x13, /* W32 */
660 AO_Later_Single_Point_Updates = 0x14, /* W 16 */
661 AO_Waveform_Generation_611x = 0x15, /* W 16 */
662 AO_Misc_611x = 0x16, /* W 16 */
663 AO_Calibration_Channel_Select_67xx = 0x17, /* W 16 */
664 AO_Configuration_2_67xx = 0x18, /* W 16 */
665 CAL_ADC_Command_67xx = 0x19, /* W 8 */
666 CAL_ADC_Status_67xx = 0x1a, /* R 8 */
667 CAL_ADC_Data_67xx = 0x1b, /* R 16 */
668 CAL_ADC_Config_Data_High_Word_67xx = 0x1c, /* RW 16 */
669 CAL_ADC_Config_Data_Low_Word_67xx = 0x1d, /* RW 16 */
670 };
671 static inline unsigned int DACx_Direct_Data_671x(int channel)
672 {
673 return channel;
674 }
675
676 enum AO_Misc_611x_Bits {
677 CLEAR_WG = 1,
678 };
679
680 #define CS5529_CFG_AOUT(x) BIT(22 + (x))
681 #define CS5529_CFG_DOUT(x) BIT(18 + (x))
682 #define CS5529_CFG_LOW_PWR_MODE BIT(16)
683 #define CS5529_CFG_WORD_RATE(x) (((x) & 0x7) << 13)
684 #define CS5529_CFG_WORD_RATE_MASK CS5529_CFG_WORD_RATE(0x7)
685 #define CS5529_CFG_WORD_RATE_2180 CS5529_CFG_WORD_RATE(0)
686 #define CS5529_CFG_WORD_RATE_1092 CS5529_CFG_WORD_RATE(1)
687 #define CS5529_CFG_WORD_RATE_532 CS5529_CFG_WORD_RATE(2)
688 #define CS5529_CFG_WORD_RATE_388 CS5529_CFG_WORD_RATE(3)
689 #define CS5529_CFG_WORD_RATE_324 CS5529_CFG_WORD_RATE(4)
690 #define CS5529_CFG_WORD_RATE_17444 CS5529_CFG_WORD_RATE(5)
691 #define CS5529_CFG_WORD_RATE_8724 CS5529_CFG_WORD_RATE(6)
692 #define CS5529_CFG_WORD_RATE_4364 CS5529_CFG_WORD_RATE(7)
693 #define CS5529_CFG_UNIPOLAR BIT(12)
694 #define CS5529_CFG_RESET BIT(7)
695 #define CS5529_CFG_RESET_VALID BIT(6)
696 #define CS5529_CFG_PORT_FLAG BIT(5)
697 #define CS5529_CFG_PWR_SAVE_SEL BIT(4)
698 #define CS5529_CFG_DONE_FLAG BIT(3)
699 #define CS5529_CFG_CALIB(x) (((x) & 0x7) << 0)
700 #define CS5529_CFG_CALIB_NONE CS5529_CFG_CALIB(0)
701 #define CS5529_CFG_CALIB_OFFSET_SELF CS5529_CFG_CALIB(1)
702 #define CS5529_CFG_CALIB_GAIN_SELF CS5529_CFG_CALIB(2)
703 #define CS5529_CFG_CALIB_BOTH_SELF CS5529_CFG_CALIB(3)
704 #define CS5529_CFG_CALIB_OFFSET_SYS CS5529_CFG_CALIB(5)
705 #define CS5529_CFG_CALIB_GAIN_SYS CS5529_CFG_CALIB(6)
706
707 enum cs5529_command_bits {
708 CSCMD_POWER_SAVE = 0x1,
709 CSCMD_REGISTER_SELECT_MASK = 0xe,
710 CSCMD_OFFSET_REGISTER = 0x0,
711 CSCMD_GAIN_REGISTER = 0x2,
712 CSCMD_CONFIG_REGISTER = 0x4,
713 CSCMD_READ = 0x10,
714 CSCMD_CONTINUOUS_CONVERSIONS = 0x20,
715 CSCMD_SINGLE_CONVERSION = 0x40,
716 CSCMD_COMMAND = 0x80,
717 };
718 enum cs5529_status_bits {
719 CSS_ADC_BUSY = 0x1,
720 CSS_OSC_DETECT = 0x2, /* indicates adc error */
721 CSS_OVERRANGE = 0x4,
722 };
723
724 /*
725 This is stuff unique to the NI E series drivers,
726 but I thought I'd put it here anyway.
727 */
728
729 enum { ai_gain_16 =
730 0, ai_gain_8, ai_gain_14, ai_gain_4, ai_gain_611x, ai_gain_622x,
731 ai_gain_628x, ai_gain_6143
732 };
733 enum caldac_enum { caldac_none = 0, mb88341, dac8800, dac8043, ad8522,
734 ad8804, ad8842, ad8804_debug
735 };
736 enum ni_reg_type {
737 ni_reg_normal = 0x0,
738 ni_reg_611x = 0x1,
739 ni_reg_6711 = 0x2,
740 ni_reg_6713 = 0x4,
741 ni_reg_67xx_mask = 0x6,
742 ni_reg_6xxx_mask = 0x7,
743 ni_reg_622x = 0x8,
744 ni_reg_625x = 0x10,
745 ni_reg_628x = 0x18,
746 ni_reg_m_series_mask = 0x18,
747 ni_reg_6143 = 0x20
748 };
749
750 static const struct comedi_lrange range_ni_E_ao_ext;
751
752 /*
753 * M-Series specific registers not handled by the DAQ-STC and GPCT register
754 * remapping.
755 */
756 #define NI_M_CDIO_DMA_SEL_REG 0x007
757 #define NI_M_CDIO_DMA_SEL_CDO(x) (((x) & 0xf) << 4)
758 #define NI_M_CDIO_DMA_SEL_CDO_MASK NI_M_CDIO_DMA_SEL_CDO(0xf)
759 #define NI_M_CDIO_DMA_SEL_CDI(x) (((x) & 0xf) << 0)
760 #define NI_M_CDIO_DMA_SEL_CDI_MASK NI_M_CDIO_DMA_SEL_CDI(0xf)
761 #define NI_M_SCXI_STATUS_REG 0x007
762 #define NI_M_AI_AO_SEL_REG 0x009
763 #define NI_M_G0_G1_SEL_REG 0x00b
764 #define NI_M_MISC_CMD_REG 0x00f
765 #define NI_M_SCXI_SER_DO_REG 0x011
766 #define NI_M_SCXI_CTRL_REG 0x013
767 #define NI_M_SCXI_OUT_ENA_REG 0x015
768 #define NI_M_AI_FIFO_DATA_REG 0x01c
769 #define NI_M_DIO_REG 0x024
770 #define NI_M_DIO_DIR_REG 0x028
771 #define NI_M_CAL_PWM_REG 0x040
772 #define NI_M_CAL_PWM_HIGH_TIME(x) (((x) & 0xffff) << 16)
773 #define NI_M_CAL_PWM_LOW_TIME(x) (((x) & 0xffff) << 0)
774 #define NI_M_GEN_PWM_REG(x) (0x044 + ((x) * 2))
775 #define NI_M_AI_CFG_FIFO_DATA_REG 0x05e
776 #define NI_M_AI_CFG_LAST_CHAN BIT(14)
777 #define NI_M_AI_CFG_DITHER BIT(13)
778 #define NI_M_AI_CFG_POLARITY BIT(12)
779 #define NI_M_AI_CFG_GAIN(x) (((x) & 0x7) << 9)
780 #define NI_M_AI_CFG_CHAN_TYPE(x) (((x) & 0x7) << 6)
781 #define NI_M_AI_CFG_CHAN_TYPE_MASK NI_M_AI_CFG_CHAN_TYPE(7)
782 #define NI_M_AI_CFG_CHAN_TYPE_CALIB NI_M_AI_CFG_CHAN_TYPE(0)
783 #define NI_M_AI_CFG_CHAN_TYPE_DIFF NI_M_AI_CFG_CHAN_TYPE(1)
784 #define NI_M_AI_CFG_CHAN_TYPE_COMMON NI_M_AI_CFG_CHAN_TYPE(2)
785 #define NI_M_AI_CFG_CHAN_TYPE_GROUND NI_M_AI_CFG_CHAN_TYPE(3)
786 #define NI_M_AI_CFG_CHAN_TYPE_AUX NI_M_AI_CFG_CHAN_TYPE(5)
787 #define NI_M_AI_CFG_CHAN_TYPE_GHOST NI_M_AI_CFG_CHAN_TYPE(7)
788 #define NI_M_AI_CFG_BANK_SEL(x) ((((x) & 0x40) << 4) | ((x) & 0x30))
789 #define NI_M_AI_CFG_CHAN_SEL(x) (((x) & 0xf) << 0)
790 #define NI_M_INTC_ENA_REG 0x088
791 #define NI_M_INTC_ENA BIT(0)
792 #define NI_M_INTC_STATUS_REG 0x088
793 #define NI_M_INTC_STATUS BIT(0)
794 #define NI_M_ATRIG_CTRL_REG 0x08c
795 #define NI_M_AO_SER_INT_ENA_REG 0x0a0
796 #define NI_M_AO_SER_INT_ACK_REG 0x0a1
797 #define NI_M_AO_SER_INT_STATUS_REG 0x0a1
798 #define NI_M_AO_CALIB_REG 0x0a3
799 #define NI_M_AO_FIFO_DATA_REG 0x0a4
800 #define NI_M_PFI_FILTER_REG 0x0b0
801 #define NI_M_PFI_FILTER_SEL(_c, _f) (((_f) & 0x3) << ((_c) * 2))
802 #define NI_M_PFI_FILTER_SEL_MASK(_c) NI_M_PFI_FILTER_SEL((_c), 0x3)
803 #define NI_M_RTSI_FILTER_REG 0x0b4
804 #define NI_M_SCXI_LEGACY_COMPAT_REG 0x0bc
805 #define NI_M_DAC_DIRECT_DATA_REG(x) (0x0c0 + ((x) * 4))
806 #define NI_M_AO_WAVEFORM_ORDER_REG(x) (0x0c2 + ((x) * 4))
807 #define NI_M_AO_CFG_BANK_REG(x) (0x0c3 + ((x) * 4))
808 #define NI_M_AO_CFG_BANK_BIPOLAR BIT(7)
809 #define NI_M_AO_CFG_BANK_UPDATE_TIMED BIT(6)
810 #define NI_M_AO_CFG_BANK_REF(x) (((x) & 0x7) << 3)
811 #define NI_M_AO_CFG_BANK_REF_MASK NI_M_AO_CFG_BANK_REF(7)
812 #define NI_M_AO_CFG_BANK_REF_INT_10V NI_M_AO_CFG_BANK_REF(0)
813 #define NI_M_AO_CFG_BANK_REF_INT_5V NI_M_AO_CFG_BANK_REF(1)
814 #define NI_M_AO_CFG_BANK_OFFSET(x) (((x) & 0x7) << 0)
815 #define NI_M_AO_CFG_BANK_OFFSET_MASK NI_M_AO_CFG_BANK_OFFSET(7)
816 #define NI_M_AO_CFG_BANK_OFFSET_0V NI_M_AO_CFG_BANK_OFFSET(0)
817 #define NI_M_AO_CFG_BANK_OFFSET_5V NI_M_AO_CFG_BANK_OFFSET(1)
818 #define NI_M_RTSI_SHARED_MUX_REG 0x1a2
819 #define NI_M_CLK_FOUT2_REG 0x1c4
820 #define NI_M_CLK_FOUT2_RTSI_10MHZ BIT(7)
821 #define NI_M_CLK_FOUT2_TIMEBASE3_PLL BIT(6)
822 #define NI_M_CLK_FOUT2_TIMEBASE1_PLL BIT(5)
823 #define NI_M_CLK_FOUT2_PLL_SRC(x) (((x) & 0x1f) << 0)
824 #define NI_M_CLK_FOUT2_PLL_SRC_MASK NI_M_CLK_FOUT2_PLL_SRC(0x1f)
825 #define NI_M_MAX_RTSI_CHAN 7
826 #define NI_M_CLK_FOUT2_PLL_SRC_RTSI(x) (((x) == NI_M_MAX_RTSI_CHAN) \
827 ? NI_M_CLK_FOUT2_PLL_SRC(0x1b) \
828 : NI_M_CLK_FOUT2_PLL_SRC(0xb + (x)))
829 #define NI_M_CLK_FOUT2_PLL_SRC_STAR NI_M_CLK_FOUT2_PLL_SRC(0x14)
830 #define NI_M_CLK_FOUT2_PLL_SRC_PXI10 NI_M_CLK_FOUT2_PLL_SRC(0x1d)
831 #define NI_M_PLL_CTRL_REG 0x1c6
832 #define NI_M_PLL_CTRL_VCO_MODE(x) (((x) & 0x3) << 13)
833 #define NI_M_PLL_CTRL_VCO_MODE_200_325MHZ NI_M_PLL_CTRL_VCO_MODE(0)
834 #define NI_M_PLL_CTRL_VCO_MODE_175_225MHZ NI_M_PLL_CTRL_VCO_MODE(1)
835 #define NI_M_PLL_CTRL_VCO_MODE_100_225MHZ NI_M_PLL_CTRL_VCO_MODE(2)
836 #define NI_M_PLL_CTRL_VCO_MODE_75_150MHZ NI_M_PLL_CTRL_VCO_MODE(3)
837 #define NI_M_PLL_CTRL_ENA BIT(12)
838 #define NI_M_PLL_MAX_DIVISOR 0x10
839 #define NI_M_PLL_CTRL_DIVISOR(x) (((x) & 0xf) << 8)
840 #define NI_M_PLL_MAX_MULTIPLIER 0x100
841 #define NI_M_PLL_CTRL_MULTIPLIER(x) (((x) & 0xff) << 0)
842 #define NI_M_PLL_STATUS_REG 0x1c8
843 #define NI_M_PLL_STATUS_LOCKED BIT(0)
844 #define NI_M_PFI_OUT_SEL_REG(x) (0x1d0 + ((x) * 2))
845 #define NI_M_PFI_CHAN(_c) (((_c) % 3) * 5)
846 #define NI_M_PFI_OUT_SEL(_c, _s) (((_s) & 0x1f) << NI_M_PFI_CHAN(_c))
847 #define NI_M_PFI_OUT_SEL_MASK(_c) (0x1f << NI_M_PFI_CHAN(_c))
848 #define NI_M_PFI_OUT_SEL_TO_SRC(_c, _b) (((_b) >> NI_M_PFI_CHAN(_c)) & 0x1f)
849 #define NI_M_PFI_DI_REG 0x1dc
850 #define NI_M_PFI_DO_REG 0x1de
851 #define NI_M_CFG_BYPASS_FIFO_REG 0x218
852 #define NI_M_CFG_BYPASS_FIFO BIT(31)
853 #define NI_M_CFG_BYPASS_AI_POLARITY BIT(22)
854 #define NI_M_CFG_BYPASS_AI_DITHER BIT(21)
855 #define NI_M_CFG_BYPASS_AI_GAIN(x) (((x) & 0x7) << 18)
856 #define NI_M_CFG_BYPASS_AO_CAL(x) (((x) & 0xf) << 15)
857 #define NI_M_CFG_BYPASS_AO_CAL_MASK NI_M_CFG_BYPASS_AO_CAL(0xf)
858 #define NI_M_CFG_BYPASS_AI_MODE_MUX(x) (((x) & 0x3) << 13)
859 #define NI_M_CFG_BYPASS_AI_MODE_MUX_MASK NI_M_CFG_BYPASS_AI_MODE_MUX(3)
860 #define NI_M_CFG_BYPASS_AI_CAL_NEG(x) (((x) & 0x7) << 10)
861 #define NI_M_CFG_BYPASS_AI_CAL_NEG_MASK NI_M_CFG_BYPASS_AI_CAL_NEG(7)
862 #define NI_M_CFG_BYPASS_AI_CAL_POS(x) (((x) & 0x7) << 7)
863 #define NI_M_CFG_BYPASS_AI_CAL_POS_MASK NI_M_CFG_BYPASS_AI_CAL_POS(7)
864 #define NI_M_CFG_BYPASS_AI_CAL_MASK (NI_M_CFG_BYPASS_AI_CAL_POS_MASK | \
865 NI_M_CFG_BYPASS_AI_CAL_NEG_MASK | \
866 NI_M_CFG_BYPASS_AI_MODE_MUX_MASK | \
867 NI_M_CFG_BYPASS_AO_CAL_MASK)
868 #define NI_M_CFG_BYPASS_AI_BANK(x) (((x) & 0xf) << 3)
869 #define NI_M_CFG_BYPASS_AI_BANK_MASK NI_M_CFG_BYPASS_AI_BANK(0xf)
870 #define NI_M_CFG_BYPASS_AI_CHAN(x) (((x) & 0x7) << 0)
871 #define NI_M_CFG_BYPASS_AI_CHAN_MASK NI_M_CFG_BYPASS_AI_CHAN(7)
872 #define NI_M_SCXI_DIO_ENA_REG 0x21c
873 #define NI_M_CDI_FIFO_DATA_REG 0x220
874 #define NI_M_CDO_FIFO_DATA_REG 0x220
875 #define NI_M_CDIO_STATUS_REG 0x224
876 #define NI_M_CDIO_STATUS_CDI_OVERFLOW BIT(20)
877 #define NI_M_CDIO_STATUS_CDI_OVERRUN BIT(19)
878 #define NI_M_CDIO_STATUS_CDI_ERROR (NI_M_CDIO_STATUS_CDI_OVERFLOW | \
879 NI_M_CDIO_STATUS_CDI_OVERRUN)
880 #define NI_M_CDIO_STATUS_CDI_FIFO_REQ BIT(18)
881 #define NI_M_CDIO_STATUS_CDI_FIFO_FULL BIT(17)
882 #define NI_M_CDIO_STATUS_CDI_FIFO_EMPTY BIT(16)
883 #define NI_M_CDIO_STATUS_CDO_UNDERFLOW BIT(4)
884 #define NI_M_CDIO_STATUS_CDO_OVERRUN BIT(3)
885 #define NI_M_CDIO_STATUS_CDO_ERROR (NI_M_CDIO_STATUS_CDO_UNDERFLOW | \
886 NI_M_CDIO_STATUS_CDO_OVERRUN)
887 #define NI_M_CDIO_STATUS_CDO_FIFO_REQ BIT(2)
888 #define NI_M_CDIO_STATUS_CDO_FIFO_FULL BIT(1)
889 #define NI_M_CDIO_STATUS_CDO_FIFO_EMPTY BIT(0)
890 #define NI_M_CDIO_CMD_REG 0x224
891 #define NI_M_CDI_CMD_SW_UPDATE BIT(20)
892 #define NI_M_CDO_CMD_SW_UPDATE BIT(19)
893 #define NI_M_CDO_CMD_F_E_INT_ENA_CLR BIT(17)
894 #define NI_M_CDO_CMD_F_E_INT_ENA_SET BIT(16)
895 #define NI_M_CDI_CMD_ERR_INT_CONFIRM BIT(15)
896 #define NI_M_CDO_CMD_ERR_INT_CONFIRM BIT(14)
897 #define NI_M_CDI_CMD_F_REQ_INT_ENA_CLR BIT(13)
898 #define NI_M_CDI_CMD_F_REQ_INT_ENA_SET BIT(12)
899 #define NI_M_CDO_CMD_F_REQ_INT_ENA_CLR BIT(11)
900 #define NI_M_CDO_CMD_F_REQ_INT_ENA_SET BIT(10)
901 #define NI_M_CDI_CMD_ERR_INT_ENA_CLR BIT(9)
902 #define NI_M_CDI_CMD_ERR_INT_ENA_SET BIT(8)
903 #define NI_M_CDO_CMD_ERR_INT_ENA_CLR BIT(7)
904 #define NI_M_CDO_CMD_ERR_INT_ENA_SET BIT(6)
905 #define NI_M_CDI_CMD_RESET BIT(5)
906 #define NI_M_CDO_CMD_RESET BIT(4)
907 #define NI_M_CDI_CMD_ARM BIT(3)
908 #define NI_M_CDI_CMD_DISARM BIT(2)
909 #define NI_M_CDO_CMD_ARM BIT(1)
910 #define NI_M_CDO_CMD_DISARM BIT(0)
911 #define NI_M_CDI_MODE_REG 0x228
912 #define NI_M_CDI_MODE_DATA_LANE(x) (((x) & 0x3) << 12)
913 #define NI_M_CDI_MODE_DATA_LANE_MASK NI_M_CDI_MODE_DATA_LANE(3)
914 #define NI_M_CDI_MODE_DATA_LANE_0_15 NI_M_CDI_MODE_DATA_LANE(0)
915 #define NI_M_CDI_MODE_DATA_LANE_16_31 NI_M_CDI_MODE_DATA_LANE(1)
916 #define NI_M_CDI_MODE_DATA_LANE_0_7 NI_M_CDI_MODE_DATA_LANE(0)
917 #define NI_M_CDI_MODE_DATA_LANE_8_15 NI_M_CDI_MODE_DATA_LANE(1)
918 #define NI_M_CDI_MODE_DATA_LANE_16_23 NI_M_CDI_MODE_DATA_LANE(2)
919 #define NI_M_CDI_MODE_DATA_LANE_24_31 NI_M_CDI_MODE_DATA_LANE(3)
920 #define NI_M_CDI_MODE_FIFO_MODE BIT(11)
921 #define NI_M_CDI_MODE_POLARITY BIT(10)
922 #define NI_M_CDI_MODE_HALT_ON_ERROR BIT(9)
923 #define NI_M_CDI_MODE_SAMPLE_SRC(x) (((x) & 0x3f) << 0)
924 #define NI_M_CDI_MODE_SAMPLE_SRC_MASK NI_M_CDI_MODE_SAMPLE_SRC(0x3f)
925 #define NI_M_CDO_MODE_REG 0x22c
926 #define NI_M_CDO_MODE_DATA_LANE(x) (((x) & 0x3) << 12)
927 #define NI_M_CDO_MODE_DATA_LANE_MASK NI_M_CDO_MODE_DATA_LANE(3)
928 #define NI_M_CDO_MODE_DATA_LANE_0_15 NI_M_CDO_MODE_DATA_LANE(0)
929 #define NI_M_CDO_MODE_DATA_LANE_16_31 NI_M_CDO_MODE_DATA_LANE(1)
930 #define NI_M_CDO_MODE_DATA_LANE_0_7 NI_M_CDO_MODE_DATA_LANE(0)
931 #define NI_M_CDO_MODE_DATA_LANE_8_15 NI_M_CDO_MODE_DATA_LANE(1)
932 #define NI_M_CDO_MODE_DATA_LANE_16_23 NI_M_CDO_MODE_DATA_LANE(2)
933 #define NI_M_CDO_MODE_DATA_LANE_24_31 NI_M_CDO_MODE_DATA_LANE(3)
934 #define NI_M_CDO_MODE_FIFO_MODE BIT(11)
935 #define NI_M_CDO_MODE_POLARITY BIT(10)
936 #define NI_M_CDO_MODE_HALT_ON_ERROR BIT(9)
937 #define NI_M_CDO_MODE_RETRANSMIT BIT(8)
938 #define NI_M_CDO_MODE_SAMPLE_SRC(x) (((x) & 0x3f) << 0)
939 #define NI_M_CDO_MODE_SAMPLE_SRC_MASK NI_M_CDO_MODE_SAMPLE_SRC(0x3f)
940 #define NI_M_CDI_MASK_ENA_REG 0x230
941 #define NI_M_CDO_MASK_ENA_REG 0x234
942 #define NI_M_STATIC_AI_CTRL_REG(x) ((x) ? (0x260 + (x)) : 0x064)
943 #define NI_M_AO_REF_ATTENUATION_REG(x) (0x264 + (x))
944 #define NI_M_AO_REF_ATTENUATION_X5 BIT(0)
945
946 #define M_SERIES_EEPROM_SIZE 1024
947
948 struct ni_board_struct {
949 const char *name;
950 int device_id;
951 int isapnp_id;
952
953 int n_adchan;
954 unsigned int ai_maxdata;
955
956 int ai_fifo_depth;
957 unsigned int alwaysdither:1;
958 int gainlkup;
959 int ai_speed;
960
961 int n_aochan;
962 unsigned int ao_maxdata;
963 int ao_fifo_depth;
964 const struct comedi_lrange *ao_range_table;
965 unsigned ao_speed;
966
967 int reg_type;
968 unsigned int has_8255:1;
969 unsigned int has_32dio_chan:1;
970
971 enum caldac_enum caldac[3];
972 };
973
974 #define MAX_N_CALDACS 34
975 #define MAX_N_AO_CHAN 8
976 #define NUM_GPCT 2
977
978 struct ni_private {
979 unsigned short dio_output;
980 unsigned short dio_control;
981 int aimode;
982 unsigned int ai_calib_source;
983 unsigned int ai_calib_source_enabled;
984 spinlock_t window_lock;
985 spinlock_t soft_reg_copy_lock;
986 spinlock_t mite_channel_lock;
987
988 int changain_state;
989 unsigned int changain_spec;
990
991 unsigned int caldac_maxdata_list[MAX_N_CALDACS];
992 unsigned short caldacs[MAX_N_CALDACS];
993
994 unsigned short ai_cmd2;
995
996 unsigned short ao_conf[MAX_N_AO_CHAN];
997 unsigned short ao_mode1;
998 unsigned short ao_mode2;
999 unsigned short ao_mode3;
1000 unsigned short ao_cmd1;
1001 unsigned short ao_cmd2;
1002 unsigned short ao_trigger_select;
1003
1004 struct ni_gpct_device *counter_dev;
1005 unsigned short an_trig_etc_reg;
1006
1007 unsigned ai_offset[512];
1008
1009 unsigned long serial_interval_ns;
1010 unsigned char serial_hw_mode;
1011 unsigned short clock_and_fout;
1012 unsigned short clock_and_fout2;
1013
1014 unsigned short int_a_enable_reg;
1015 unsigned short int_b_enable_reg;
1016 unsigned short io_bidirection_pin_reg;
1017 unsigned short rtsi_trig_direction_reg;
1018 unsigned short rtsi_trig_a_output_reg;
1019 unsigned short rtsi_trig_b_output_reg;
1020 unsigned short pfi_output_select_reg[NUM_PFI_OUTPUT_SELECT_REGS];
1021 unsigned short ai_ao_select_reg;
1022 unsigned short g0_g1_select_reg;
1023 unsigned short cdio_dma_select_reg;
1024
1025 unsigned clock_ns;
1026 unsigned clock_source;
1027
1028 unsigned short pwm_up_count;
1029 unsigned short pwm_down_count;
1030
1031 unsigned short ai_fifo_buffer[0x2000];
1032 uint8_t eeprom_buffer[M_SERIES_EEPROM_SIZE];
1033 __be32 serial_number;
1034
1035 struct mite_struct *mite;
1036 struct mite_channel *ai_mite_chan;
1037 struct mite_channel *ao_mite_chan;
1038 struct mite_channel *cdo_mite_chan;
1039 struct mite_dma_descriptor_ring *ai_mite_ring;
1040 struct mite_dma_descriptor_ring *ao_mite_ring;
1041 struct mite_dma_descriptor_ring *cdo_mite_ring;
1042 struct mite_dma_descriptor_ring *gpct_mite_ring[NUM_GPCT];
1043
1044 /* ni_pcimio board type flags (based on the boardinfo reg_type) */
1045 unsigned int is_m_series:1;
1046 unsigned int is_6xxx:1;
1047 unsigned int is_611x:1;
1048 unsigned int is_6143:1;
1049 unsigned int is_622x:1;
1050 unsigned int is_625x:1;
1051 unsigned int is_628x:1;
1052 unsigned int is_67xx:1;
1053 unsigned int is_6711:1;
1054 unsigned int is_6713:1;
1055 };
1056
1057 #endif /* _COMEDI_NI_STC_H */