From: Frank Mori Hess Date: Thu, 23 Aug 2001 00:54:13 +0000 (+0000) Subject: tweak to analog out interrupt handler X-Git-Tag: r0_7_61~157 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fcbaedbf1eede618303ed1acac7c2278b4bfb47b;p=comedi.git tweak to analog out interrupt handler --- 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) {