int i_NbrAoChannel;
int i_AiMaxdata;
int i_AoMaxdata;
- int i_NbrTTLChannel;
unsigned char b_AvailableConvertUnit;
unsigned int ui_MinAcquisitiontimeNs;
unsigned int has_dig_in:1;
unsigned int has_dig_out:1;
+ unsigned int has_ttl_io:1;
};
static const struct apci3xxx_boardinfo apci3xxx_boardtypes[] = {
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
.i_AiMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
+ .has_ttl_io = 1,
},
[BOARD_APCI3000_8] = {
.pc_DriverName = "apci3000-8",
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
.i_AiMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
+ .has_ttl_io = 1,
},
[BOARD_APCI3000_4] = {
.pc_DriverName = "apci3000-4",
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
.i_AiMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
+ .has_ttl_io = 1,
},
[BOARD_APCI3006_16] = {
.pc_DriverName = "apci3006-16",
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
.i_AiMaxdata = 65535,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
+ .has_ttl_io = 1,
},
[BOARD_APCI3006_8] = {
.pc_DriverName = "apci3006-8",
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
.i_AiMaxdata = 65535,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
+ .has_ttl_io = 1,
},
[BOARD_APCI3006_4] = {
.pc_DriverName = "apci3006-4",
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
.i_AiMaxdata = 65535,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
+ .has_ttl_io = 1,
},
[BOARD_APCI3010_16] = {
.pc_DriverName = "apci3010-16",
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
.i_AiMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 5000,
.has_dig_in = 1,
.has_dig_out = 1,
+ .has_ttl_io = 1,
},
[BOARD_APCI3010_8] = {
.pc_DriverName = "apci3010-8",
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
.i_AiMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 5000,
.has_dig_in = 1,
.has_dig_out = 1,
+ .has_ttl_io = 1,
},
[BOARD_APCI3010_4] = {
.pc_DriverName = "apci3010-4",
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
.i_AiMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 5000,
.has_dig_in = 1,
.has_dig_out = 1,
+ .has_ttl_io = 1,
},
[BOARD_APCI3016_16] = {
.pc_DriverName = "apci3016-16",
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
.i_AiMaxdata = 65535,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 5000,
.has_dig_in = 1,
.has_dig_out = 1,
+ .has_ttl_io = 1,
},
[BOARD_APCI3016_8] = {
.pc_DriverName = "apci3016-8",
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
.i_AiMaxdata = 65535,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 5000,
.has_dig_in = 1,
.has_dig_out = 1,
+ .has_ttl_io = 1,
},
[BOARD_APCI3016_4] = {
.pc_DriverName = "apci3016-4",
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
.i_AiMaxdata = 65535,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 5000,
.has_dig_in = 1,
.has_dig_out = 1,
+ .has_ttl_io = 1,
},
[BOARD_APCI3100_16_4] = {
.pc_DriverName = "apci3100-16-4",
.i_NbrAoChannel = 4,
.i_AiMaxdata = 4095,
.i_AoMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
+ .has_ttl_io = 1,
},
[BOARD_APCI3100_8_4] = {
.pc_DriverName = "apci3100-8-4",
.i_NbrAoChannel = 4,
.i_AiMaxdata = 4095,
.i_AoMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
+ .has_ttl_io = 1,
},
[BOARD_APCI3106_16_4] = {
.pc_DriverName = "apci3106-16-4",
.i_NbrAoChannel = 4,
.i_AiMaxdata = 65535,
.i_AoMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
+ .has_ttl_io = 1,
},
[BOARD_APCI3106_8_4] = {
.pc_DriverName = "apci3106-8-4",
.i_NbrAoChannel = 4,
.i_AiMaxdata = 65535,
.i_AoMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
+ .has_ttl_io = 1,
},
[BOARD_APCI3110_16_4] = {
.pc_DriverName = "apci3110-16-4",
.i_NbrAoChannel = 4,
.i_AiMaxdata = 4095,
.i_AoMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 5000,
.has_dig_in = 1,
.has_dig_out = 1,
+ .has_ttl_io = 1,
},
[BOARD_APCI3110_8_4] = {
.pc_DriverName = "apci3110-8-4",
.i_NbrAoChannel = 4,
.i_AiMaxdata = 4095,
.i_AoMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 5000,
.has_dig_in = 1,
.has_dig_out = 1,
+ .has_ttl_io = 1,
},
[BOARD_APCI3116_16_4] = {
.pc_DriverName = "apci3116-16-4",
.i_NbrAoChannel = 4,
.i_AiMaxdata = 65535,
.i_AoMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 5000,
.has_dig_in = 1,
.has_dig_out = 1,
+ .has_ttl_io = 1,
},
[BOARD_APCI3116_8_4] = {
.pc_DriverName = "apci3116-8-4",
.i_NbrAoChannel = 4,
.i_AiMaxdata = 65535,
.i_AoMaxdata = 4095,
- .i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 5000,
.has_dig_in = 1,
.has_dig_out = 1,
+ .has_ttl_io = 1,
},
[BOARD_APCI3003] = {
.pc_DriverName = "apci3003",
.pc_DriverName = "apci3500",
.i_NbrAoChannel = 4,
.i_AoMaxdata = 4095,
- .i_NbrTTLChannel = 24,
+ .has_ttl_io = 1,
},
};
/* Allocate and Initialise TTL */
s = &dev->subdevices[5];
- if (board->i_NbrTTLChannel) {
+ if (board->has_ttl_io) {
s->type = COMEDI_SUBD_DIO;
s->subdev_flags =
SDF_WRITEABLE | SDF_READABLE | SDF_GROUND | SDF_COMMON;
- s->n_chan = board->i_NbrTTLChannel;
+ s->n_chan = 24;
s->maxdata = 1;
s->io_bits = 0; /* all bits input */
- s->len_chanlist = board->i_NbrTTLChannel;
s->range_table = &range_digital;
s->insn_config = i_APCI3XXX_InsnConfigInitTTLIO;
s->insn_bits = i_APCI3XXX_InsnBitsTTLIO;