From: Frank Mori Hess Date: Tue, 19 Nov 2002 13:42:29 +0000 (+0000) Subject: fixed disabling of dma when using TRIG_WAKE_EOS X-Git-Tag: r0_7_66~38 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=25b1ad997016afbc30cdf0900ae71c17e285a4c5;p=comedi.git fixed disabling of dma when using TRIG_WAKE_EOS --- diff --git a/comedi/drivers/cb_pcidas64.c b/comedi/drivers/cb_pcidas64.c index 24900e29..b83f5da0 100644 --- a/comedi/drivers/cb_pcidas64.c +++ b/comedi/drivers/cb_pcidas64.c @@ -2130,13 +2130,6 @@ static int ai_cmd(comedi_device *dev,comedi_subdevice *s) priv(dev)->adc_control1_bits |= adc_mode_bits( 13 ); // good old mode 13 else priv(dev)->adc_control1_bits |= adc_mode_bits(8); // mode 8. What else could you need? -#if 0 - // this causes interrupt on end of scan to be disabled on 60xx? - if(cmd->flags & TRIG_WAKE_EOS) - priv(dev)->adc_control1_bits |= ADC_DMA_DISABLE_BIT; - else - priv(dev)->adc_control1_bits &= ~ADC_DMA_DISABLE_BIT; -#endif } else { priv(dev)->adc_control1_bits &= ~CHANNEL_MODE_4020_MASK; @@ -2189,6 +2182,8 @@ static int ai_cmd(comedi_device *dev,comedi_subdevice *s) /* enable pacing, triggering, etc */ bits = ADC_ENABLE_BIT | ADC_SOFT_GATE_BITS | ADC_GATE_LEVEL_BIT; + if(cmd->flags & TRIG_WAKE_EOS) + bits |= ADC_DMA_DISABLE_BIT; // set start trigger if( cmd->start_src == TRIG_EXT ) { @@ -2201,7 +2196,7 @@ static int ai_cmd(comedi_device *dev,comedi_subdevice *s) bits |= ADC_SAMPLE_COUNTER_EN_BIT; writew(bits, priv(dev)->main_iobase + ADC_CONTROL0_REG); DEBUG_PRINT("control0 bits 0x%x\n", bits); - + priv(dev)->ai_cmd_running = 1; comedi_spin_unlock_irqrestore( &dev->spinlock, flags );