return -EBUSY;
}
-/* Cancel a running acquisition */
-
-static int daqp_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
+static int daqp_ai_cancel(struct comedi_device *dev,
+ struct comedi_subdevice *s)
{
struct daqp_private *devpriv = dev->private;
if (devpriv->stop)
return -EIO;
+ /*
+ * Stop any conversions, disable interrupts, and clear
+ * the status event flags.
+ */
outb(DAQP_CMD_STOP, dev->iobase + DAQP_CMD_REG);
-
- /* flush any linguring data in FIFO - superfluous here */
- /* outb(DAQP_CMD_RSTF, dev->iobase + DAQP_CMD_REG); */
+ outb(0, dev->iobase + DAQP_CTRL_REG);
+ inb(dev->iobase + DAQP_STATUS_REG);
return 0;
}
if (devpriv->stop)
return -EIO;
- /* Stop any running conversion */
- daqp_ai_cancel(dev, s);
-
outb(0, dev->iobase + DAQP_AUX_REG);
/* Reset scan list queue */
if (devpriv->stop)
return -EIO;
- /* Stop any running conversion */
- daqp_ai_cancel(dev, s);
-
outb(0, dev->iobase + DAQP_AUX_REG);
/* Reset scan list queue */