int ai_speed; // fastest conversion period in ns
comedi_lrange *ai_range_table;
int ao_nchan; // number of analog out channels
+ int ao_bits; // analog output resolution
int ao_scan_speed; // analog output speed (for a scan, not conversion)
comedi_lrange *ao_range_table;
int *ao_range_code;
ai_bits: 16,
ai_speed: 5000,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 10000,
layout: LAYOUT_64XX,
ai_range_table: &ai_ranges_64xx,
ai_bits: 12,
ai_speed: 5000,
ao_nchan: 2,
+ ao_bits: 12,
ao_scan_speed: 10000,
layout: LAYOUT_64XX,
ai_range_table: &ai_ranges_64xx,
ai_bits: 16,
ai_speed: 1000,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 10000,
layout: LAYOUT_64XX,
ai_range_table: &ai_ranges_64xx,
ai_bits: 16,
ai_speed: 500,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 10000,
layout: LAYOUT_64XX,
ai_range_table: &ai_ranges_64xx,
ai_bits: 16,
ai_speed: 333,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 10000,
layout: LAYOUT_64XX,
ai_range_table: &ai_ranges_64xx,
ai_bits: 16,
ai_speed: 5000,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 100000,
layout: LAYOUT_60XX,
ai_range_table: &ai_ranges_60xx,
ai_bits: 12,
ai_speed: 5000,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 100000,
layout: LAYOUT_60XX,
ai_range_table: &ai_ranges_60xx,
ai_bits: 16,
ai_speed: 10000,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 10000,
layout: LAYOUT_60XX,
ai_range_table: &ai_ranges_6030,
ai_bits: 16,
ai_speed: 10000,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 10000,
layout: LAYOUT_60XX,
ai_range_table: &ai_ranges_6030,
ai_bits: 16,
ai_speed: 5000,
ao_nchan: 2,
+ ao_bits: 12,
ao_scan_speed: 100000,
layout: LAYOUT_60XX,
ai_range_table: &ai_ranges_60xx,
ai_bits: 16,
ai_speed: 5000,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 100000,
layout: LAYOUT_60XX,
ai_range_table: &ai_ranges_60xx,
ai_bits: 12,
ai_speed: 2000,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 1000,
layout: LAYOUT_60XX,
ai_range_table: &ai_ranges_6052,
ai_bits: 16,
ai_speed: 3333,
ao_nchan: 2,
+ ao_bits: 16,
ao_scan_speed: 3333,
layout: LAYOUT_60XX,
ai_range_table: &ai_ranges_6052,
ai_bits: 12,
ai_speed: 800,
ao_nchan: 2,
+ ao_bits: 12,
ao_scan_speed: 1000,
layout: LAYOUT_60XX,
ai_range_table: &ai_ranges_6052,
ai_bits: 12,
ai_speed: 800,
ao_nchan: 2,
+ ao_bits: 12,
ao_scan_speed: 1000,
layout: LAYOUT_60XX,
ai_range_table: &ai_ranges_6052,
ai_se_chans: 4,
ai_bits: 12,
ai_speed: 50,
+ ao_bits: 12,
ao_nchan: 2,
ao_scan_speed: 0, // no hardware pacing on ao
layout: LAYOUT_4020,
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND;
s->n_chan = board(dev)->ao_nchan;
- // analog out resolution is the same as analog input resolution, so use ai_bits
- s->maxdata = (1 << board(dev)->ai_bits) - 1;
+ s->maxdata = (1 << board(dev)->ao_bits) - 1;
s->range_table = board(dev)->ao_range_table;
s->insn_read = ao_readback_insn;
s->insn_write = ao_winsn;