rti800: fix straight-binary/2's-complement option for DAC channel 1
authorIan Abbott <abbotti@mev.co.uk>
Tue, 9 Apr 2013 09:53:23 +0000 (10:53 +0100)
committerIan Abbott <abbotti@mev.co.uk>
Tue, 9 Apr 2013 09:53:23 +0000 (10:53 +0100)
commit1abc08d4f7316b7f3718586fb10f27e2fd72c2e1
tree55fe874e85e6628f3d93605e260053c812e9e599
parent973ac3e64e8c810bbac0148fd6f51d3df19e9585
rti800: fix straight-binary/2's-complement option for DAC channel 1

configuration option[8] is supposed to indicate whether the DAC channel
1 jumpers are set for straight binary or 2's complement coding, with
option[6] doing the same for DAC channel 0.  However, the code that
writes the DAC channels currently uses the option[6] value for both
channels.  Fix it to use the correct option for DAC channel 1.  Thanks
to H Hartley Sweeten for spotting this bug.

Also replace the dac0_range and dac1_range members in the private data
with array dac_range[2], and replace dac0_coding and dac1_coding members
with array dac_coding[2].

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
comedi/drivers/rti800.c