44 #include "../comedidev.h"
51 #define ATAO_SIZE 0x20
53 #define ATAO_2_DMATCCLR 0x00
55 #define ATAO_DOUT 0x00
57 #define ATAO_CFG2 0x02
75 #define ATAO_2_INT1CLR 0x02
77 #define ATAO_CFG3 0x04
78 #define DMAMODE 0x0040
81 #define DOUTEN2 0x0008
82 #define DOUTEN1 0x0004
86 #define ATAO_2_INT2CLR 0x04
88 #define ATAO_82C53_BASE 0x06
90 #define ATAO_82C53_CNTR1 0x06
91 #define ATAO_82C53_CNTR2 0x07
92 #define ATAO_82C53_CNTR3 0x08
93 #define ATAO_82C53_CNTRCMD 0x09
100 #define MODESEL0 0x02
118 #define ATAO_2_RTSISHFT 0x06
121 #define ATAO_2_RTSISTRB 0x07
123 #define ATAO_CFG1 0x0a
124 #define EXTINT2EN 0x8000
125 #define EXTINT1EN 0x4000
126 #define CNTINT2EN 0x2000
127 #define CNTINT1EN 0x1000
128 #define TCINTEN 0x0800
129 #define CNT1SRC 0x0400
130 #define CNT2SRC 0x0200
131 #define FIFOEN 0x0100
132 #define GRP2WR 0x0080
133 #define EXTUPDEN 0x0040
136 #define CH_mask 0x000f
137 #define ATAO_STATUS 0x0a
144 #define PROMOUT 0x0001
146 #define ATAO_FIFO_WRITE 0x0c
147 #define ATAO_FIFO_CLEAR 0x0c
148 #define ATAO_DACn(x) (0x0c + 2*(x))
170 #define devpriv ((struct atao_private *)dev->private)
209 for (i = 0; i < insn->
n; i++) {
210 bits = data[
i] - 0x800;
220 devpriv->ao_readback[chan] = data[
i];
232 for (i = 0; i < insn->
n; i++)
233 data[i] =
devpriv->ao_readback[chan];
243 s->
state &= ~data[0];
244 s->
state |= data[0] & data[1];
265 mask = (chan < 4) ? 0x0f : 0xf0;
303 for (i = 0; i < insn->
n; i++)
312 unsigned int bitstring,
bit;
315 bitstring = ((chan & 0x7) << 8) | (data[insn->
n - 1] & 0xff);
317 for (bit = 1 << (11 - 1);
bit; bit >>= 1) {
347 printk(
" I/O port conflict\n");
354 if (alloc_private(dev,
sizeof(
struct atao_private)) < 0)
411 static const struct atao_board atao_boards[] = {
422 .driver_name =
"ni_at_ao",
424 .attach = atao_attach,
425 .detach = atao_detach,
426 .board_name = &atao_boards[0].
name,