62 #include "../comedidev.h"
70 #define PCL711_SIZE 16
75 #define PCL711_CTRCTL 3
76 #define PCL711_AD_LO 4
77 #define PCL711_DA0_LO 4
78 #define PCL711_AD_HI 5
79 #define PCL711_DA0_HI 5
80 #define PCL711_DI_LO 6
81 #define PCL711_DA1_LO 6
82 #define PCL711_DI_HI 7
83 #define PCL711_DA1_HI 7
84 #define PCL711_CLRINTR 8
87 #define PCL711_MODE 11
88 #define PCL711_SOFTTRIG 12
89 #define PCL711_DO_LO 13
90 #define PCL711_DO_HI 14
101 static const struct comedi_lrange range_acl8112hg_ai = { 12, {
117 static const struct comedi_lrange range_acl8112dg_ai = { 9, {
134 #define PCL711_TIMEOUT 100
135 #define PCL711_DRDY 0x10
137 static const int i8253_osc_base = 500;
164 #define devpriv ((struct pcl711_private *)dev->private)
183 data = (hi << 8) | lo;
217 if (chan_register >= 8)
218 chan_register = 0x20 | (chan_register & 0x7);
220 chan_register |= 0x10;
233 pcl711_set_changain(dev, insn->
chanspec);
235 for (n = 0; n < insn->
n; n++) {
258 data[
n] = ((hi & 0xf) << 8) | lo;
285 err |= cfc_check_trigger_is_unique(cmd->
stop_src);
304 #define MAX_SPEED 1000
305 #define TIMER_BASE 100
335 i8253_cascade_ns_to_timer_2div(TIMER_BASE,
355 pcl711_set_changain(dev, cmd->
chanlist[0]);
404 for (n = 0; n < insn->
n; n++) {
405 outb((data[n] & 0xff),
410 devpriv->ao_readback[chan] = data[
n];
423 for (n = 0; n < insn->
n; n++)
424 data[n] =
devpriv->ao_readback[chan];
447 s->
state &= ~data[0];
448 s->
state |= data[0] & data[1];
450 if (data[0] & 0x00ff)
452 if (data[0] & 0xff00)
473 printk(
"I/O port conflict\n");
484 if (irq > board->
maxirq) {
489 if (
request_irq(irq, pcl711_interrupt, 0,
"pcl711", dev)) {
519 s->
do_cmd = pcl711_ai_cmd;
582 {
"pcl711b", 1, 0, 0, 5, 8, 1, 7, &range_pcl711b_ai },
583 {
"acl8112hg", 0, 1, 0, 12, 16, 2, 15, &range_acl8112hg_ai },
584 {
"acl8112dg", 0, 1, 1, 9, 16, 2, 15, &range_acl8112dg_ai },
588 .driver_name =
"pcl711",
590 .attach = pcl711_attach,
591 .detach = pcl711_detach,
592 .board_name = &boardtypes[0].
name,