TODO:
Add support for analog out on 'ao' cards.
- what happens on external stop source with dma turned off?
*/
#include <linux/kernel.h>
#define DMA_CH6_CH7 0x6
#define DMA_CH7_CH5 0x7
#define DMA_ENABLED 0x3 //mask used to determine if dma is enabled
-#define DMA_DUAL 0x4
+#define DMA_DUAL 0x4
#define IRQ3 0x8
#define IRQ5 0x10
#define IRQ7 0x18
das1800_handle_dma(dev, s);
}
}
- else if(status & FHF)
+ // if fifo half full, and there has not an external stop trigger
+ else if((status & FHF) && !(status & CT0TC))
{
das1800_handle_fifo_half_full(dev, s);
} else if(status & FNE)
if(!unipolar);
dpnt += 1 << (thisboard->resolution - 1);
write_to_buffer(dev, s, dpnt);
- if(devpriv->count > 0) devpriv->count--;
}
return;
}
while(inb(dev->iobase + DAS1800_STATUS) & FNE)
{
+ if(devpriv->count == 0 && devpriv->forever == 0)
+ break;
dpnt = inw(dev->iobase + DAS1800_FIFO);
/* convert to unsigned type if we are in a bipolar mode */
if(!unipolar);
dpnt += 1 << (thisboard->resolution - 1);
write_to_buffer(dev, s, dpnt);
- if(devpriv->count > 0) devpriv->count--;
- if(devpriv->count == 0 && devpriv->forever == 0)
- break;
}
return;
}
s->async->buf_int_count += sizeof(sampl_t);
s->async->buf_int_ptr += sizeof(sampl_t);
+ if(devpriv->count > 0) devpriv->count--;
}
void disable_das1800(comedi_device *dev)