From fcbaedbf1eede618303ed1acac7c2278b4bfb47b Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Thu, 23 Aug 2001 00:54:13 +0000 Subject: [PATCH] tweak to analog out interrupt handler --- comedi/drivers/cb_pcidas.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/comedi/drivers/cb_pcidas.c b/comedi/drivers/cb_pcidas.c index f8fa576f..5b2955ff 100644 --- a/comedi/drivers/cb_pcidas.c +++ b/comedi/drivers/cb_pcidas.c @@ -1336,15 +1336,18 @@ static void handle_ao_interrupt(comedi_device *dev, unsigned int status) { // clear dac empty interrupt latch outw(devpriv->adc_fifo_bits | DAEMI, devpriv->control_status + INT_ADCFIFO); - if(cmd->stop_src == TRIG_COUNT && - devpriv->ao_count) + if(inw(devpriv->ao_registers + DAC_CSR) & DAC_EMPTY) { - comedi_error(dev, "dac fifo underflow"); - cb_pcidas_ao_cancel(dev, s); - async->events |= COMEDI_CB_ERROR; + if(cmd->stop_src == TRIG_NONE || + (cmd->stop_src == TRIG_COUNT && devpriv->ao_count)) + { + comedi_error(dev, "dac fifo underflow"); + cb_pcidas_ao_cancel(dev, s); + async->events |= COMEDI_CB_ERROR; + } + async->events |= COMEDI_CB_EOA; + return; } - async->events |= COMEDI_CB_EOA; - return; } if(status & DAHFI) { -- 2.26.2