#define APCI3120_TIMER_STATUS_REGISTER 0x0d
#define APCI3120_RD_STATUS 0x02
-#define APCI3120_WR_ADDRESS 0x00
#define APCI3120_ENABLE_WATCHDOG 0x20
#define APCI3120_DISABLE_WATCHDOG (~APCI3120_ENABLE_WATCHDOG)
#define APCI3120_ENABLE_TIMER_COUNTER 0x10
devpriv->ctrl |= APCI3120_CTRL_GATE(timer);
else
devpriv->ctrl &= ~APCI3120_CTRL_GATE(timer);
- outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
+ outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
}
static int apci3120_ai_insn_config(struct comedi_device *dev,
/* set scan length (PR) and scan start (PA) */
devpriv->ctrl = APCI3120_CTRL_PR(n_chan - 1) | APCI3120_CTRL_PA(0);
- outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
+ outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
for (i = 0; i < n_chan; i++) {
/* store range list to card */
/* disable all counters, ext trigger, and reset scan */
devpriv->ctrl = 0;
- outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
+ outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
inw(dev->iobase + 0); /* make a dummy read */
inb(dev->iobase + APCI3120_RESET_FIFO); /* flush FIFO */
devpriv->ctrl |= APCI3120_CTRL_EXT_TRIG;
else
devpriv->ctrl &= ~APCI3120_CTRL_EXT_TRIG;
- outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
+ outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
}
static int apci3120_cancel(struct comedi_device *dev,
/* disable all counters, ext trigger, and reset scan */
devpriv->ctrl = 0;
- outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
+ outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
/* DISABLE_ALL_INTERRUPT */
outb(APCI3120_DISABLE_ALL_INTERRUPT,