mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03: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:
@ -10,7 +10,7 @@ ARDUINO 1.5.6 BETA
|
|||||||
|
|
||||||
[core]
|
[core]
|
||||||
* sam: Fixed wrap-around bug in delay() (Mark Tillotson)
|
* 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
|
ARDUINO 1.5.5 BETA 2013.11.28
|
||||||
|
|
||||||
|
@ -149,9 +149,9 @@ uint32_t analogRead(uint32_t ulPin)
|
|||||||
|
|
||||||
// Enable the corresponding channel
|
// Enable the corresponding channel
|
||||||
if (ulChannel != latestSelectedChannel) {
|
if (ulChannel != latestSelectedChannel) {
|
||||||
|
adc_enable_channel( ADC, ulChannel );
|
||||||
if ( latestSelectedChannel != -1 )
|
if ( latestSelectedChannel != -1 )
|
||||||
adc_disable_channel( ADC, latestSelectedChannel );
|
adc_disable_channel( ADC, latestSelectedChannel );
|
||||||
adc_enable_channel( ADC, ulChannel );
|
|
||||||
latestSelectedChannel = ulChannel;
|
latestSelectedChannel = ulChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user