// if fifo half-full
if(status & ADHFI)
{
- // clear half-full interrupt latch
- outw(devpriv->adc_fifo_bits | INT, devpriv->control_status + INT_ADCFIFO);
// read data
insw(devpriv->adc_fifo + ADCDATA, data, half_fifo);
for(i = 0; i < half_fifo; i++)
}
}
async->events |= COMEDI_CB_BLOCK;
+ // clear half-full interrupt latch
+ outw(devpriv->adc_fifo_bits | INT, devpriv->control_status + INT_ADCFIFO);
// else if fifo not empty
}else if(status & (ADNEI | EOBI))
{
- // clear not-empty interrupt latch
- outw(devpriv->adc_fifo_bits | INT, devpriv->control_status + INT_ADCFIFO);
for(i = 0; i < timeout; i++)
{
// break if fifo is empty
}
}
async->events |= COMEDI_CB_BLOCK;
+ // clear not-empty interrupt latch
+ outw(devpriv->adc_fifo_bits | INT, devpriv->control_status + INT_ADCFIFO);
}else if(status & EOAI)
{
comedi_error(dev, "bug! encountered end of aquisition interrupt?");
}
if(status & DAHFI)
{
- // clear half-full interrupt latch
- outw(devpriv->adc_fifo_bits | DAHFI, devpriv->control_status + INT_ADCFIFO);
// figure out how many points we are writing to fifo
num_points = half_fifo;
if(cmd->stop_src == TRIG_COUNT &&
// write data to board's fifo
outsw(devpriv->ao_registers + DACDATA, data, i);
async->events |= COMEDI_CB_BLOCK;
+ // clear half-full interrupt latch
+ outw(devpriv->adc_fifo_bits | DAHFI, devpriv->control_status + INT_ADCFIFO);
}
}
comedi_error(dev, "spurious interrupt");
return;
}
- /* clear interrupt */
- outb(FNE, dev->iobase + DAS1800_STATUS);
das1800_ai_handler(dev, status);
+ /* clear interrupt */
+ outb(FNE, dev->iobase + DAS1800_STATUS);
+
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
}