fixed disabling of dma when using TRIG_WAKE_EOS
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 19 Nov 2002 13:42:29 +0000 (13:42 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 19 Nov 2002 13:42:29 +0000 (13:42 +0000)
comedi/drivers/cb_pcidas64.c

index 24900e29e321e588656aaa6479a9c8f3cbbe2b9a..b83f5da04f58cb551ec73909bd74722b99ce62d0 100644 (file)
@@ -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 );