54 #include <linux/slab.h>
55 #include "../comedidev.h"
63 static struct pcmcia_device *pcmcia_cur_dev;
78 #define ADCLEAR_R 0x01
91 s->
state |= (data[0] & data[1]);
97 data[1] = s->
state & 0xff;
139 for (n = 0; n < insn->
n; n++) {
146 for (i = 0; i <
TIMEOUT; i++) {
148 if ((status & 0x03) != 0) {
150 "Overflow/run Error\n");
154 if ((status & 0x02) != 0) {
158 if ((status & 0x11) == 0x01) {
166 "timeout during ADC conversion\n");
209 struct pcmcia_device *
link;
212 link = pcmcia_cur_dev;
216 dev->
iobase = link->resource[0]->start;
249 daq700_ai_config(dev, s);
266 .name =
"daqcard-700",
268 .name =
"ni_daq_700",
273 .driver_name =
"ni_daq_700",
275 .attach = daq700_attach,
276 .detach = daq700_detach,
277 .board_name = &daq700_boards[0].
name,
282 static int daq700_pcmcia_config_loop(
struct pcmcia_device *p_dev,
285 if (p_dev->config_index == 0)
291 static int daq700_cs_attach(
struct pcmcia_device *link)
295 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_AUDIO |
298 ret = pcmcia_loop_config(link, daq700_pcmcia_config_loop,
NULL);
309 pcmcia_cur_dev =
link;
317 static void daq700_cs_detach(
struct pcmcia_device *link)
320 pcmcia_cur_dev =
NULL;
324 PCMCIA_DEVICE_MANF_CARD(0x010b, 0x4743),
329 static struct pcmcia_driver daq700_cs_driver = {
330 .name =
"ni_daq_700",
332 .probe = daq700_cs_attach,
333 .remove = daq700_cs_detach,
334 .id_table = daq700_cs_ids,
337 static int __init daq700_cs_init(
void)
355 static void __exit daq700_cs_exit(
void)
364 "Comedi driver for National Instruments PCMCIA DAQCard-700 DIO/AI");