};
struct rti800_private {
- enum {
- adc_bipolar10, adc_bipolar5, adc_unipolar10
- } adc_range;
enum {
adc_2comp, adc_straight
} adc_coding;
return -ENOMEM;
dev->private = devpriv;
- devpriv->adc_range = it->options[3];
devpriv->adc_coding = it->options[4];
devpriv->dac0_range = it->options[5];
devpriv->dac0_coding = it->options[6];
s->n_chan = (it->options[2] ? 16 : 8);
s->insn_read = rti800_ai_insn_read;
s->maxdata = 0xfff;
- switch (devpriv->adc_range) {
- case adc_bipolar10:
+ switch (it->options[3]) {
+ case 0:
s->range_table = &range_rti800_ai_10_bipolar;
break;
- case adc_bipolar5:
+ case 1:
s->range_table = &range_rti800_ai_5_bipolar;
break;
- case adc_unipolar10:
+ case 2:
s->range_table = &range_rti800_ai_unipolar;
break;
}