};
static inline int CR_REQSDRQ(unsigned drq_line)
{
- /* m-series are supposed to have 6 dma channels, but
- I not sure how to set the drq line on the mite when
- using channels 4 or 5. */
+ /* This also works on m-series when
+ using channels (drq_line) 4 or 5. */
return CR_REQS((drq_line & 0x3) | 0x4);
}
static inline int CR_RL(unsigned int retry_limit)
static int ni_request_ai_mite_channel(comedi_device *dev)
{
unsigned long flags;
- /* really should be 5 for m-series, but I don't know how to get
- mite dma channels 4 and 5 working */
- static const unsigned max_dma_channel = 3;
+ static const unsigned max_dma_channel = 5;
comedi_spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
BUG_ON(devpriv->ai_mite_chan);
static int ni_request_ao_mite_channel(comedi_device *dev)
{
unsigned long flags;
- /* really should be 5 for m-series, but I don't know how to get
- mite dma channels 4 and 5 working */
- static const unsigned max_dma_channel = 3;
+ static const unsigned max_dma_channel = 5;
comedi_spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
BUG_ON(devpriv->ao_mite_chan);
retval = ni_request_ai_mite_channel(dev);
if(retval) return retval;
-// rt_printk("comedi_debug: using mite channel %i for ai.\n", devpriv->ai_mite_chan->channel);
+// rt_printk("comedi_debug: using mite channel %i for ai.\n", devpriv->ai_mite_chan->channel);
/* write alloc the entire buffer */
comedi_buf_write_alloc(s->async, s->async->prealloc_bufsz);
{
unsigned int chan = CR_CHAN(insn->chanspec);
unsigned int invert;
-
+
invert = ni_ao_config_chanlist(dev,s,&insn->chanspec, 1, 0);
devpriv->ao[chan] = data[0];