From: Frank Mori Hess Date: Thu, 13 Sep 2001 17:19:57 +0000 (+0000) Subject: fixed sending of events for analog output X-Git-Tag: r0_7_61~96 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=125a8fea9ecf0e2c03cfa82df0482d7adc62f657;p=comedi.git fixed sending of events for analog output --- diff --git a/comedi/drivers/cb_pcidas.c b/comedi/drivers/cb_pcidas.c index 06a882bc..5a5f4aa4 100644 --- a/comedi/drivers/cb_pcidas.c +++ b/comedi/drivers/cb_pcidas.c @@ -873,13 +873,16 @@ static int cb_pcidas_ai_cmdtest(comedi_device *dev,comedi_subdevice *s, if(cmd->stop_src != TRIG_COUNT && cmd->stop_src != TRIG_NONE) err++; - // make sure convert_src and scan_begin_src are compatible + // make sure trigger sources are compatible with each other if(cmd->scan_begin_src == TRIG_FOLLOW && cmd->convert_src == TRIG_NOW) err++; if(cmd->scan_begin_src != TRIG_FOLLOW && cmd->convert_src != TRIG_NOW) err++; + if(cmd->start_src == TRIG_EXT && + (cmd->convert_src == TRIG_EXT || cmd->scan_begin_src == TRIG_EXT)) + err++; if(err) return 2; @@ -1402,6 +1405,8 @@ static void handle_ao_interrupt(comedi_device *dev, unsigned int status) sampl_t data[max_half_fifo]; unsigned int num_points, i; + async->events = 0; + if(status & DAEMI) { // clear dac empty interrupt latch @@ -1441,6 +1446,8 @@ static void handle_ao_interrupt(comedi_device *dev, unsigned int status) // clear half-full interrupt latch outw(devpriv->adc_fifo_bits | DAHFI, devpriv->control_status + INT_ADCFIFO); } + + comedi_event(dev, s, async->events); } // cancel analog input command