42 #include "../comedidev.h"
46 #define DAS6402_SIZE 16
48 #define N_WORDS (3000*64)
54 #define BYTE unsigned char
55 #define WORD unsigned short
68 #define IRQ (0x04 << 4)
86 #define FIFOHFULL 0x08
88 #define FIFONEPTY 0x04
107 #define devpriv ((struct das6402_private *)dev->private)
122 unsigned short ctrlwrd;
128 p = (
BYTE) (0xff & ctrlwrd);
130 p = (
BYTE) (0xff & (ctrlwrd >> 8));
137 p = (
BYTE) (0xff & ctrlwrd);
139 p = (
BYTE) (0xff & (ctrlwrd >> 8));
146 p = (
BYTE) (0xff & ctrlwrd);
148 p = (
BYTE) (0xff & (ctrlwrd >> 8));
162 printk(
"das6402: interrupt! das6402_irqcount=%i\n",
167 das6402_ai_fifo_dregs(dev, s);
169 if (s->
async->buf_write_count >=
devpriv->ai_bytes_to_read) {
173 printk(
"das6402: Got %i samples\n\n",
174 devpriv->das6402_wordsread - diff);
191 for (i = 0; i <
n; i++)
204 devpriv->das6402_ignoreirq = 1;
206 devpriv->das6402_ignoreirq = 1;
220 devpriv->das6402_ignoreirq = 1;
229 devpriv->das6402_ignoreirq = 0;
241 devpriv->das6402_ignoreirq = 1;
268 das6402_setcounter(dev);
272 devpriv->das6402_ignoreirq = 0;
320 s->
cancel = das6402_ai_cancel;
339 .driver_name =
"das6402",
341 .attach = das6402_attach,
342 .detach = das6402_detach,