1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-26 20:54:22 +01:00

[sam] Fixed regression in analogRead() (fails to read multiple channels) (Mark Tillotson)

See #1740 #1634

http://forum.arduino.cc/index.php?topic=203322.msg1509907#msg1509907
This commit is contained in:
Cristian Maglie 2013-12-17 22:51:57 +01:00
parent a1c4809105
commit b530742603
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ ARDUINO 1.5.6 BETA
[core]
* sam: Fixed wrap-around bug in delay() (Mark Tillotson)
* sam: Fixed regression in analogRead() (fails to read multiple channels)
* sam: Fixed regression in analogRead() (fails to read multiple channels) (Mark Tillotson)
ARDUINO 1.5.5 BETA 2013.11.28

View File

@ -149,9 +149,9 @@ uint32_t analogRead(uint32_t ulPin)
// Enable the corresponding channel
if (ulChannel != latestSelectedChannel) {
adc_enable_channel( ADC, ulChannel );
if ( latestSelectedChannel != -1 )
adc_disable_channel( ADC, latestSelectedChannel );
adc_enable_channel( ADC, ulChannel );
latestSelectedChannel = ulChannel;
}