const char *name;
int ai_subdev_flags;
int ai_n_chan;
- int i_NbrAiChannelDiff;
unsigned int ai_maxdata;
unsigned char ai_conv_units;
unsigned int ai_min_acq_ns;
.name = "apci3000-16",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 16,
- .i_NbrAiChannelDiff = 8,
.ai_maxdata = 0x0fff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 10000,
.name = "apci3000-8",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 8,
- .i_NbrAiChannelDiff = 4,
.ai_maxdata = 0x0fff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 10000,
.name = "apci3000-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 4,
- .i_NbrAiChannelDiff = 2,
.ai_maxdata = 0x0fff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 10000,
.name = "apci3006-16",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 16,
- .i_NbrAiChannelDiff = 8,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 10000,
.name = "apci3006-8",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 8,
- .i_NbrAiChannelDiff = 4,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 10000,
.name = "apci3006-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 4,
- .i_NbrAiChannelDiff = 2,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 10000,
.name = "apci3010-16",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 16,
- .i_NbrAiChannelDiff = 8,
.ai_maxdata = 0x0fff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
.name = "apci3010-8",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 8,
- .i_NbrAiChannelDiff = 4,
.ai_maxdata = 0x0fff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
.name = "apci3010-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 4,
- .i_NbrAiChannelDiff = 2,
.ai_maxdata = 0x0fff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
.name = "apci3016-16",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 16,
- .i_NbrAiChannelDiff = 8,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
.name = "apci3016-8",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 8,
- .i_NbrAiChannelDiff = 4,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
.name = "apci3016-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 4,
- .i_NbrAiChannelDiff = 2,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
.name = "apci3100-16-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 16,
- .i_NbrAiChannelDiff = 8,
.ai_maxdata = 0x0fff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 10000,
.name = "apci3100-8-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 8,
- .i_NbrAiChannelDiff = 4,
.ai_maxdata = 0x0fff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 10000,
.name = "apci3106-16-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 16,
- .i_NbrAiChannelDiff = 8,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 10000,
.name = "apci3106-8-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 8,
- .i_NbrAiChannelDiff = 4,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 10000,
.name = "apci3110-16-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 16,
- .i_NbrAiChannelDiff = 8,
.ai_maxdata = 0x0fff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
.name = "apci3110-8-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 8,
- .i_NbrAiChannelDiff = 4,
.ai_maxdata = 0x0fff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
.name = "apci3116-16-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 16,
- .i_NbrAiChannelDiff = 8,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
.name = "apci3116-8-4",
.ai_subdev_flags = SDF_COMMON | SDF_GROUND | SDF_DIFF,
.ai_n_chan = 8,
- .i_NbrAiChannelDiff = 4,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
[BOARD_APCI3003] = {
.name = "apci3003",
.ai_subdev_flags = SDF_DIFF,
- .i_NbrAiChannelDiff = 4,
+ .ai_n_chan = 4,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US |
CONV_UNIT_NS,
[BOARD_APCI3002_16] = {
.name = "apci3002-16",
.ai_subdev_flags = SDF_DIFF,
- .i_NbrAiChannelDiff = 16,
+ .ai_n_chan = 16,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
[BOARD_APCI3002_8] = {
.name = "apci3002-8",
.ai_subdev_flags = SDF_DIFF,
- .i_NbrAiChannelDiff = 8,
+ .ai_n_chan = 8,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
[BOARD_APCI3002_4] = {
.name = "apci3002-4",
.ai_subdev_flags = SDF_DIFF,
- .i_NbrAiChannelDiff = 4,
+ .ai_n_chan = 4,
.ai_maxdata = 0xffff,
.ai_conv_units = CONV_UNIT_MS | CONV_UNIT_US,
.ai_min_acq_ns = 5000,
/* Allocate and Initialise AI Subdevice Structures */
s = &dev->subdevices[0];
- if (board->ai_n_chan || board->i_NbrAiChannelDiff) {
+ if (board->ai_n_chan) {
dev->read_subdev = s;
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | board->ai_subdev_flags;
- if (board->ai_n_chan) {
- s->n_chan = board->ai_n_chan;
- devpriv->b_SingelDiff = 0;
- } else {
- s->n_chan = board->i_NbrAiChannelDiff;
- devpriv->b_SingelDiff = 1;
- }
+ s->n_chan = board->ai_n_chan;
s->maxdata = board->ai_maxdata;
s->len_chanlist = s->n_chan;
s->range_table = &apci3xxx_ai_range;
-
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;
}