{
const struct apci3xxx_boardinfo *board = comedi_board(dev);
struct apci3xxx_private *devpriv = dev->private;
- unsigned int aref_mode = data[1];
unsigned int time_base = data[2];
unsigned int reload_time = data[3];
unsigned int acq_ns;
- if (aref_mode != 0 && aref_mode != 1)
- return -EINVAL;
-
if (time_base > 2)
return -EINVAL;
devpriv->ui_EocEosConversionTime = reload_time;
devpriv->b_EocEosConversionTimeBase = time_base;
- devpriv->b_SingelDiff = aref_mode;
/* Set the convert timing unit */
writel(time_base, devpriv->mmio + 36);
struct apci3xxx_private *devpriv = dev->private;
unsigned int chan = CR_CHAN(insn->chanspec);
unsigned int range = CR_RANGE(insn->chanspec);
+ unsigned int aref = CR_AREF(insn->chanspec);
unsigned char use_interrupt = 0; /* FIXME: use interrupts */
unsigned int delay_mode;
unsigned int val;
/* Make the configuration */
val = (range & 3) | ((range >> 2) << 6) |
- (devpriv->b_SingelDiff << 7);
+ ((aref == AREF_DIFF) << 7);
writel(val, devpriv->mmio + 0);
/* Channel selection */
unsigned char b_EocEosInterrupt;
unsigned int ui_EocEosConversionTime;
unsigned char b_EocEosConversionTimeBase;
- unsigned char b_SingelDiff;
};
#include "addi-data/hwdrv_apci3xxx.c"
s->insn_config = apci3xxx_ai_insn_config;
s->insn_read = apci3xxx_ai_insn_read;
- if ((board->ai_subdev_flags & (SDF_COMMON | SDF_GROUND)) == 0)
- devpriv->b_SingelDiff = 1;
-
} else {
s->type = COMEDI_SUBD_UNUSED;
}