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:
parent
a1c4809105
commit
b530742603
@ -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
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user