unsigned char id;
int ai_speed; /* max conversion period in nanoseconds */
int qram_len; /* length of card's channel / gain queue */
- int ao_ability; /* 0 == no analog out, 1 == basic analog out, 2 == waveform analog out */
const struct comedi_lrange *range_ai; /* available input ranges */
};
.id = DAS1800_ID_ST,
.ai_speed = 6250,
.qram_len = 256,
- .ao_ability = 0,
.range_ai = &range_ai_das1801,
},
[BOARD_DAS1701ST_DA] = {
.id = DAS1800_ID_ST_DA,
.ai_speed = 6250,
.qram_len = 256,
- .ao_ability = 1,
.range_ai = &range_ai_das1801,
},
[BOARD_DAS1702ST] = {
.id = DAS1800_ID_ST,
.ai_speed = 6250,
.qram_len = 256,
- .ao_ability = 0,
.range_ai = &range_ai_das1802,
},
[BOARD_DAS1702ST_DA] = {
.id = DAS1800_ID_ST_DA,
.ai_speed = 6250,
.qram_len = 256,
- .ao_ability = 1,
.range_ai = &range_ai_das1802,
},
[BOARD_DAS1702HR] = {
.id = DAS1800_ID_HR,
.ai_speed = 20000,
.qram_len = 256,
- .ao_ability = 0,
.range_ai = &range_ai_das1802,
},
[BOARD_DAS1702HR_DA] = {
.id = DAS1800_ID_HR_DA,
.ai_speed = 20000,
.qram_len = 256,
- .ao_ability = 1,
.range_ai = &range_ai_das1802,
},
[BOARD_DAS1701AO] = {
.id = DAS1800_ID_AO,
.ai_speed = 6250,
.qram_len = 256,
- .ao_ability = 2,
.range_ai = &range_ai_das1801,
},
[BOARD_DAS1702AO] = {
.id = DAS1800_ID_AO,
.ai_speed = 6250,
.qram_len = 256,
- .ao_ability = 2,
.range_ai = &range_ai_das1802,
},
[BOARD_DAS1801ST] = {
.id = DAS1800_ID_ST,
.ai_speed = 3000,
.qram_len = 256,
- .ao_ability = 0,
.range_ai = &range_ai_das1801,
},
[BOARD_DAS1801ST_DA] = {
.id = DAS1800_ID_ST_DA,
.ai_speed = 3000,
.qram_len = 256,
- .ao_ability = 1,
.range_ai = &range_ai_das1801,
},
[BOARD_DAS1802ST] = {
.id = DAS1800_ID_ST,
.ai_speed = 3000,
.qram_len = 256,
- .ao_ability = 0,
.range_ai = &range_ai_das1802,
},
[BOARD_DAS1802ST_DA] = {
.id = DAS1800_ID_ST_DA,
.ai_speed = 3000,
.qram_len = 256,
- .ao_ability = 1,
.range_ai = &range_ai_das1802,
},
[BOARD_DAS1802HR] = {
.id = DAS1800_ID_HR,
.ai_speed = 10000,
.qram_len = 256,
- .ao_ability = 0,
.range_ai = &range_ai_das1802,
},
[BOARD_DAS1802HR_DA] = {
.id = DAS1800_ID_HR_DA,
.ai_speed = 10000,
.qram_len = 256,
- .ao_ability = 1,
.range_ai = &range_ai_das1802,
},
[BOARD_DAS1801HC] = {
.id = DAS1800_ID_HC,
.ai_speed = 3000,
.qram_len = 64,
- .ao_ability = 1,
.range_ai = &range_ai_das1801,
},
[BOARD_DAS1802HC] = {
.id = DAS1800_ID_HC,
.ai_speed = 3000,
.qram_len = 64,
- .ao_ability = 1,
.range_ai = &range_ai_das1802,
},
[BOARD_DAS1801AO] = {
.id = DAS1800_ID_AO,
.ai_speed = 3000,
.qram_len = 256,
- .ao_ability = 2,
.range_ai = &range_ai_das1801,
},
[BOARD_DAS1802AO] = {
.id = DAS1800_ID_AO,
.ai_speed = 3000,
.qram_len = 256,
- .ao_ability = 2,
.range_ai = &range_ai_das1802,
},
};
is_16bit = board->id == DAS1800_ID_HR || board->id == DAS1800_ID_HR_DA;
- /* if it is an 'ao' board with fancy analog out then we need extra io ports */
- if (board->ao_ability == 2) {
+ /* waveform 'ao' boards have additional io ports */
+ if (board->id == DAS1800_ID_AO) {
unsigned long iobase2 = dev->iobase + IOBASE2;
ret = __comedi_request_region(dev, iobase2, DAS1800_SIZE);
/* Analog Output subdevice */
s = &dev->subdevices[1];
- if (board->ao_ability == 1) {
+ if (board->id == DAS1800_ID_ST_DA || board->id == DAS1800_ID_HR_DA) {
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITABLE;
s->n_chan = (board->id == DAS1800_ID_ST_DA) ? 4 : 2;
outb(DAC(i), dev->iobase + DAS1800_SELECT);
outw(0, dev->iobase + DAS1800_DAC);
}
+ } else if (board->id == DAS1800_ID_AO) {
+ /*
+ * 'ao' boards have waveform analog outputs that are not
+ * currently supported.
+ */
+ s->type = COMEDI_SUBD_UNUSED;
} else {
s->type = COMEDI_SUBD_UNUSED;
}