81 #include "../comedidev.h"
84 #define ADQ12B_SIZE 16
86 #define ADQ12B_CTREG 0x00
87 #define ADQ12B_STINR 0x00
88 #define ADQ12B_OUTBR 0x04
89 #define ADQ12B_ADLOW 0x08
90 #define ADQ12B_ADHIG 0x09
91 #define ADQ12B_CONT0 0x0c
92 #define ADQ12B_CONT1 0x0d
93 #define ADQ12B_CONT2 0x0e
94 #define ADQ12B_COWORD 0x0f
97 #define ADQ12B_EOC 0x20
102 static const struct comedi_lrange range_adq12b_ai_bipolar = { 4, {
110 static const struct comedi_lrange range_adq12b_ai_unipolar = { 4, {
162 for (n = 0; n < insn->
n; n++) {
170 }
while (status == 0 && ++i <
TIMEOUT);
179 data[
n] = (hi << 8) | lo;
205 for (channel = 0; channel < 8; channel++)
206 if (((data[0] >> channel) & 0x01) != 0)
207 outb((((data[1] >> channel) & 0x01) << 3) | channel,
227 int unipolar, differential;
235 "%s and %s\n", dev->
minor, iobase,
236 (unipolar == 1) ?
"unipolar" :
"bipolar",
237 (differential == 1) ?
"differential" :
"single-ended");
242 "address not specified. Trying the default 0x300.\n",
247 printk(
"comedi%d: adq12b: 0x%04lx ", dev->
minor, iobase);
249 printk(
"I/O port conflict\n");
256 ret = alloc_private(dev,
sizeof(*devpriv));
338 .driver_name =
"adq12b",
340 .attach = adq12b_attach,
341 .detach = adq12b_detach,
342 .board_name = &adq12b_boards[0].
name,