*data = ui_Type;
return insn->n;
}
-
-/*
-+----------------------------------------------------------------------------+
-| Function Name : int i_APCI2032_Reset(struct comedi_device *dev) |
-| |
-+----------------------------------------------------------------------------+
-| Task :Resets the registers of the card |
-+----------------------------------------------------------------------------+
-| Input Parameters : |
-+----------------------------------------------------------------------------+
-| Output Parameters : -- |
-+----------------------------------------------------------------------------+
-| Return Value : |
-| |
-+----------------------------------------------------------------------------+
-*/
-
-static int i_APCI2032_Reset(struct comedi_device *dev)
-{
- struct addi_private *devpriv = dev->private;
-
- devpriv->b_DigitalOutputRegister = 0;
- ui_Type = 0;
- outl(0x0, devpriv->iobase + APCI2032_DIGITAL_OP); /* Resets the output channels */
- outl(0x0, devpriv->iobase + APCI2032_DIGITAL_OP_INTERRUPT); /* Disables the interrupt. */
- outl(0x0, devpriv->iobase + APCI2032_DIGITAL_OP_WATCHDOG + APCI2032_TCW_PROG); /* disable the watchdog */
- outl(0x0, devpriv->iobase + APCI2032_DIGITAL_OP_WATCHDOG + APCI2032_TCW_RELOAD_VALUE); /* reload=0 */
- return 0;
-}
.i_DoMaxdata = 0xffffffff,
.i_Timer = 1,
.interrupt = v_APCI2032_Interrupt,
- .reset = i_APCI2032_Reset,
.do_config = i_APCI2032_ConfigDigitalOutput,
.do_bits = apci2032_do_insn_bits,
.do_read = i_APCI2032_ReadInterruptStatus,
return IRQ_RETVAL(1);
}
-static int i_ADDI_Reset(struct comedi_device *dev)
+static int apci2032_reset(struct comedi_device *dev)
{
- const struct addi_board *this_board = comedi_board(dev);
+ struct addi_private *devpriv = dev->private;
+
+ devpriv->b_DigitalOutputRegister = 0;
+ ui_Type = 0;
+ outl(0x0, devpriv->iobase + APCI2032_DIGITAL_OP);
+ outl(0x0, devpriv->iobase + APCI2032_DIGITAL_OP_INTERRUPT);
+ outl(0x0, devpriv->iobase + APCI2032_DIGITAL_OP_WATCHDOG + APCI2032_TCW_PROG);
+ outl(0x0, devpriv->iobase + APCI2032_DIGITAL_OP_WATCHDOG + APCI2032_TCW_RELOAD_VALUE);
- this_board->reset(dev);
return 0;
}
s = &dev->subdevices[6];
s->type = COMEDI_SUBD_UNUSED;
- i_ADDI_Reset(dev);
+ apci2032_reset(dev);
return 0;
}
if (devpriv) {
if (dev->iobase)
- i_ADDI_Reset(dev);
+ apci2032_reset(dev);
if (dev->irq)
free_irq(dev->irq, dev);
if (devpriv->dw_AiBase)