Skip to content
This repository has been archived by the owner on Oct 7, 2019. It is now read-only.

Commit

Permalink
ad5593/ad5593.cpp: Fix pin function bug when changing from DAC to ADC
Browse files Browse the repository at this point in the history
In case a pin was configured with function DAC and is afterwards set
to ADC. The pin would still read the previous set voltage.

Fixed by clearing the DAC ENABLE bit.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
  • Loading branch information
mhennerich committed May 19, 2017
1 parent 00e1fac commit 4099a00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ad5593/ad5593.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ void io::function(IoFunction func)
switch (func)
{
case ADC:
ClearBit(dac_en);
SetBit(adc_en);
ClearBit(gpio_out);
ClearBit(gpio_in);
Expand Down

0 comments on commit 4099a00

Please sign in to comment.