56 #include "../comedidev.h"
60 #define RTI800_SIZE 16
63 #define RTI800_MUXGAIN 1
64 #define RTI800_CONVERT 2
65 #define RTI800_ADCLO 3
66 #define RTI800_ADCHI 4
67 #define RTI800_DAC0LO 5
68 #define RTI800_DAC0HI 6
69 #define RTI800_DAC1LO 7
70 #define RTI800_DAC1HI 8
71 #define RTI800_CLRFLAGS 9
74 #define RTI800_9513A_DATA 12
75 #define RTI800_9513A_CNTRL 13
76 #define RTI800_9513A_STATUS 13
82 #define RTI800_BUSY 0x80
83 #define RTI800_DONE 0x40
84 #define RTI800_OVERRUN 0x20
85 #define RTI800_TCR 0x10
86 #define RTI800_DMA_ENAB 0x08
87 #define RTI800_INTR_TC 0x04
88 #define RTI800_INTR_EC 0x02
89 #define RTI800_INTR_OVRN 0x01
91 #define Am9513_8BITBUS
93 #define Am9513_output_control(a) outb(a, dev->iobase+RTI800_9513A_CNTRL)
94 #define Am9513_output_data(a) outb(a, dev->iobase+RTI800_9513A_DATA)
95 #define Am9513_input_data() inb(dev->iobase+RTI800_9513A_DATA)
96 #define Am9513_input_status() inb(dev->iobase+RTI800_9513A_STATUS)
100 static const struct comedi_lrange range_rti800_ai_10_bipolar = { 4, {
112 static const struct comedi_lrange range_rti800_ai_5_bipolar = { 4, {
124 static const struct comedi_lrange range_rti800_ai_unipolar = { 4, {
164 #define devpriv ((struct rti800_private *)dev->private)
166 #define RTI800_TIMEOUT 100
174 static const int gaindelay[] = { 10, 20, 40, 80 };
184 unsigned muxgain_bits;
189 muxgain_bits = chan | (gain << 5);
190 if (muxgain_bits !=
devpriv->muxgain_bits) {
191 devpriv->muxgain_bits = muxgain_bits;
201 for (i = 0; i < insn->
n; i++) {
221 if (
devpriv->adc_coding == adc_2comp)
235 for (i = 0; i < insn->
n; i++)
236 data[i] =
devpriv->ao_readback[chan];
249 for (i = 0; i < insn->
n; i++) {
250 devpriv->ao_readback[chan] = d = data[
i];
251 if (
devpriv->dac0_coding == dac_2comp)
275 s->
state &= ~data[0];
276 s->
state |= data[0] & data[1];
334 ret =
request_irq(irq, rti800_interrupt, 0,
"rti800", dev);
454 .driver_name =
"rti800",
456 .attach = rti800_attach,
457 .detach = rti800_detach,
459 .board_name = &boardtypes[0].
name,