From: Frank Mori Hess Date: Sun, 22 Jul 2001 22:00:26 +0000 (+0000) Subject: comedi_cmd works now, added some debugging info to insn X-Git-Tag: r0_7_60~27 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=72befed0ff9520657bdfef16b0262212708c6249;p=comedi.git comedi_cmd works now, added some debugging info to insn --- diff --git a/comedi/drivers/ni_at_a2150.c b/comedi/drivers/ni_at_a2150.c index 2b1d7403..d2ad1013 100644 --- a/comedi/drivers/ni_at_a2150.c +++ b/comedi/drivers/ni_at_a2150.c @@ -414,7 +414,7 @@ static int a2150_attach(comedi_device *dev, comedi_devconfig *it) s = dev->subdevices + 0; dev->read_subdev = s; s->type = COMEDI_SUBD_AI; - s->subdev_flags = SDF_READABLE; + s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_OTHER; s->n_chan = 4; s->len_chanlist = 4; s->maxdata = 0xffff; @@ -780,10 +780,20 @@ static int a2150_ai_rinsn(comedi_device *dev, comedi_subdevice *s, comedi_insn * comedi_error(dev, "timeout"); return -ETIME; } + +#ifdef A2150_DEBUG + ni_dump_regs(dev); +#endif data[n] = inw(dev->iobase + FIFO_DATA_REG); +#ifdef A2150_DEBUG + rt_printk(" data is %i\n", data[n]); +#endif data[n] ^= 0x8000; } + // clear fifo and reset triggering circuitry + outw(0, dev->iobase + FIFO_RESET_REG); + return n; }