#define DADATA 8 /* FIRST D/A DATA REGISTER (0) */
static const struct comedi_lrange cb_pcidda_ranges = {
- 6,
- {
- BIP_RANGE(10),
- BIP_RANGE(5),
- BIP_RANGE(2.5),
- UNI_RANGE(10),
- UNI_RANGE(5),
- UNI_RANGE(2.5),
- }
+ 6, {
+ BIP_RANGE(10),
+ BIP_RANGE(5),
+ BIP_RANGE(2.5),
+ UNI_RANGE(10),
+ UNI_RANGE(5),
+ UNI_RANGE(2.5)
+ }
};
/*
unsigned short device_id;
int ao_chans;
int ao_bits;
- const struct comedi_lrange *ranges;
};
static const struct cb_pcidda_board cb_pcidda_boards[] = {
.device_id = PCI_DEVICE_ID_DDA02_12,
.ao_chans = 2,
.ao_bits = 12,
- .ranges = &cb_pcidda_ranges,
},
{
.name = "pci-dda04/12",
.device_id = PCI_DEVICE_ID_DDA04_12,
.ao_chans = 4,
.ao_bits = 12,
- .ranges = &cb_pcidda_ranges,
},
{
.name = "pci-dda08/12",
.device_id = PCI_DEVICE_ID_DDA08_12,
.ao_chans = 8,
.ao_bits = 12,
- .ranges = &cb_pcidda_ranges,
},
{
.name = "pci-dda02/16",
.device_id = PCI_DEVICE_ID_DDA02_16,
.ao_chans = 2,
.ao_bits = 16,
- .ranges = &cb_pcidda_ranges,
},
{
.name = "pci-dda04/16",
.device_id = PCI_DEVICE_ID_DDA04_16,
.ao_chans = 4,
.ao_bits = 16,
- .ranges = &cb_pcidda_ranges,
},
{
.name = "pci-dda08/16",
.device_id = PCI_DEVICE_ID_DDA08_16,
.ao_chans = 8,
.ao_bits = 16,
- .ranges = &cb_pcidda_ranges,
},
};
s->subdev_flags = SDF_WRITABLE;
s->n_chan = thisboard->ao_chans;
s->maxdata = (1 << thisboard->ao_bits) - 1;
- s->range_table = thisboard->ranges;
+ s->range_table = &cb_pcidda_ranges;
s->insn_write = cb_pcidda_ao_winsn;
/* two 8255 digital io subdevices */