#define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */
#endif
+static const struct comedi_lrange apci3xxx_ai_range = {
+ 8, {
+ BIP_RANGE(10),
+ BIP_RANGE(5),
+ BIP_RANGE(2),
+ BIP_RANGE(1),
+ UNI_RANGE(10),
+ UNI_RANGE(5),
+ UNI_RANGE(2),
+ UNI_RANGE(1)
+ }
+};
+
+static const struct comedi_lrange apci3xxx_ao_range = {
+ 2, {
+ BIP_RANGE(10),
+ UNI_RANGE(10)
+ }
+};
+
enum apci3xxx_boardid {
BOARD_APCI3000_16,
BOARD_APCI3000_8,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
.i_AiMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
.i_AiMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
.i_AiMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
.i_AiMaxdata = 65535,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
.i_AiMaxdata = 65535,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
.i_AiMaxdata = 65535,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
.i_AiMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
.i_AiMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
.i_AiMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
.i_AiMaxdata = 65535,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 8,
.i_AiMaxdata = 65535,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAiChannelDiff = 2,
.i_AiChannelList = 4,
.i_AiMaxdata = 65535,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAoChannel = 4,
.i_AiMaxdata = 4095,
.i_AoMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
- .pr_AoRangelist = &range_apci3XXX_ao,
.i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
.i_NbrAoChannel = 4,
.i_AiMaxdata = 4095,
.i_AoMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
- .pr_AoRangelist = &range_apci3XXX_ao,
.i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
.i_NbrAoChannel = 4,
.i_AiMaxdata = 65535,
.i_AoMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
- .pr_AoRangelist = &range_apci3XXX_ao,
.i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
.i_NbrAoChannel = 4,
.i_AiMaxdata = 65535,
.i_AoMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
- .pr_AoRangelist = &range_apci3XXX_ao,
.i_NbrTTLChannel = 24,
.b_AvailableConvertUnit = 6,
.ui_MinAcquisitiontimeNs = 10000,
.i_NbrAoChannel = 4,
.i_AiMaxdata = 4095,
.i_AoMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
- .pr_AoRangelist = &range_apci3XXX_ao,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAoChannel = 4,
.i_AiMaxdata = 4095,
.i_AoMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
- .pr_AoRangelist = &range_apci3XXX_ao,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAoChannel = 4,
.i_AiMaxdata = 65535,
.i_AoMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
- .pr_AoRangelist = &range_apci3XXX_ao,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAoChannel = 4,
.i_AiMaxdata = 65535,
.i_AoMaxdata = 4095,
- .pr_AiRangelist = &range_apci3XXX_ai,
- .pr_AoRangelist = &range_apci3XXX_ao,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 4,
.i_AiMaxdata = 65535,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAiChannelDiff = 16,
.i_AiChannelList = 16,
.i_AiMaxdata = 65535,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 8,
.i_AiMaxdata = 65535,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.i_NbrAiChannelDiff = 4,
.i_AiChannelList = 4,
.i_AiMaxdata = 65535,
- .pr_AiRangelist = &range_apci3XXX_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 1,
.pc_EepromChip = ADDIDATA_9054,
.i_NbrAoChannel = 4,
.i_AoMaxdata = 4095,
- .pr_AoRangelist = &range_apci3XXX_ao,
.i_NbrTTLChannel = 24,
.ao_write = i_APCI3XXX_InsnWriteAnalogOutput,
.ttl_config = i_APCI3XXX_InsnConfigInitTTLIO,
}
s->maxdata = devpriv->s_EeParameters.i_AiMaxdata;
s->len_chanlist = board->i_AiChannelList;
- s->range_table = board->pr_AiRangelist;
+ s->range_table = &apci3xxx_ai_range;
/* Set the initialisation flag */
devpriv->b_AiInitialisation = 1;
s->n_chan = devpriv->s_EeParameters.i_NbrAoChannel;
s->maxdata = devpriv->s_EeParameters.i_AoMaxdata;
s->len_chanlist = devpriv->s_EeParameters.i_NbrAoChannel;
- s->range_table = board->pr_AoRangelist;
+ s->range_table = &apci3xxx_ao_range;
s->insn_config = board->ao_config;
s->insn_write = board->ao_write;
} else {