APCI2200_WATCHDOG_STATUS) & 0x1;
return insn->n;
}
-
-/*
-+----------------------------------------------------------------------------+
-| Function Name : int i_APCI2200_Reset(struct comedi_device *dev) | |
-+----------------------------------------------------------------------------+
-| Task :resets all the registers |
-+----------------------------------------------------------------------------+
-| Input Parameters : struct comedi_device *dev
-+----------------------------------------------------------------------------+
-| Output Parameters : -- |
-+----------------------------------------------------------------------------+
-| Return Value : |
-| |
-+----------------------------------------------------------------------------+
-*/
-
-static int i_APCI2200_Reset(struct comedi_device *dev)
-{
- struct addi_private *devpriv = dev->private;
-
- outw(0x0, devpriv->iobase + APCI2200_DIGITAL_OP); /* RESETS THE DIGITAL OUTPUTS */
- outw(0x0,
- devpriv->iobase + APCI2200_WATCHDOG +
- APCI2200_WATCHDOG_ENABLEDISABLE);
- outw(0x0,
- devpriv->iobase + APCI2200_WATCHDOG +
- APCI2200_WATCHDOG_RELOAD_VALUE);
- outw(0x0,
- devpriv->iobase + APCI2200_WATCHDOG +
- APCI2200_WATCHDOG_RELOAD_VALUE + 2);
- return 0;
-}
.i_NbrDiChannel = 8,
.i_NbrDoChannel = 16,
.i_Timer = 1,
- .reset = i_APCI2200_Reset,
.di_bits = apci2200_di_insn_bits,
.do_bits = apci2200_do_insn_bits,
.timer_config = i_APCI2200_ConfigWatchdog,
return IRQ_RETVAL(1);
}
-static int i_ADDI_Reset(struct comedi_device *dev)
+static int apci2200_reset(struct comedi_device *dev)
{
- const struct addi_board *this_board = comedi_board(dev);
+ struct addi_private *devpriv = dev->private;
+
+ outw(0x0, devpriv->iobase + APCI2200_DIGITAL_OP);
+ outw(0x0, devpriv->iobase + APCI2200_WATCHDOG +
+ APCI2200_WATCHDOG_ENABLEDISABLE);
+ outw(0x0, devpriv->iobase + APCI2200_WATCHDOG +
+ APCI2200_WATCHDOG_RELOAD_VALUE);
+ outw(0x0, devpriv->iobase + APCI2200_WATCHDOG +
+ APCI2200_WATCHDOG_RELOAD_VALUE + 2);
- this_board->reset(dev);
return 0;
}
s = &dev->subdevices[6];
s->type = COMEDI_SUBD_UNUSED;
- i_ADDI_Reset(dev);
+ apci2200_reset(dev);
return 0;
}
if (devpriv) {
if (dev->iobase)
- i_ADDI_Reset(dev);
+ apci2200_reset(dev);
if (dev->irq)
free_irq(dev->irq, dev);
if (devpriv->dw_AiBase)