das-1802hr, das-1802hr-da, das-1802hc, das-1802ao
Status: works
-Presently, DMA is disabled if you enable hard real-time support for
-Comedi. The waveform analog output on the 'ao' cards is not supported.
+The waveform analog output on the 'ao' cards is not supported.
If you need it, send me (Frank Hess) an email.
Configuration options:
NOTES:
Only the DAS-1801ST has been tested by me.
Unipolar and bipolar ranges cannot be mixed in the channel/gain list.
-For safety reasons, the driver disables dma transfers if you enable
- real-time support in comedi.
TODO:
Add support for analog out on 'ao' cards.
unsigned long flags;
int iobase = it->options[0];
int irq = it->options[1];
- int dma0, dma1;
+ int dma0 = it->options[2];
+ int dma1 = it->options[3];
int iobase2;
int board;
-// disable unsafe isa dma if comedi real time kernel support is on
-#ifdef CONFIG_COMEDI_RT
- dma0 = 0;
- dma1 = 0;
- if(it->options[2] || it->options[3])
- printk("%s: dma disabled to avoid conflicts with RT support\n", driver_das1800.driver_name);
-#else
- dma0 = it->options[2];
- dma1 = it->options[3];
-#endif
-
/* allocate and initialize dev->private */
if(alloc_private(dev, sizeof(das1800_private)) < 0)
return -ENOMEM;
return -1;
}
+ /* disable dma on TRIG_WAKE_EOS (to reduce latency) or TRIG_RT
+ * (because dma in handler is unsafe at hard real-time priority) */
+ if(cmd.flags & (TRIG_WAKE_EOS | TRIG_RT))
+ {
+ devpriv->irq_dma_bits &= ~DMA_ENABLED;
+ }else
+ {
+ devpriv->irq_dma_bits |= devpriv->dma_bits;
+ }
+ // interrupt on end of conversion for TRIG_WAKE_EOS
if(cmd.flags & TRIG_WAKE_EOS)
{
// interrupt fifo not empty
devpriv->irq_dma_bits &= ~FIMD;
- // turn off dma
- devpriv->irq_dma_bits &= ~DMA_ENABLED;
}else
{
// interrupt fifo half full
devpriv->irq_dma_bits |= FIMD;
- // turn on dma if configured
- devpriv->irq_dma_bits |= devpriv->dma_bits;
}
-
// determine how many conversions we need
if(cmd.stop_src == TRIG_COUNT)
{