mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-27 21:54:30 +01:00
parent
1c6a57e15d
commit
4b3db72a46
@ -150,7 +150,7 @@ 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 );
|
adc_enable_channel( ADC, ulChannel );
|
||||||
if ( latestSelectedChannel != -1 )
|
if ( latestSelectedChannel != (uint32_t)-1 )
|
||||||
adc_disable_channel( ADC, latestSelectedChannel );
|
adc_disable_channel( ADC, latestSelectedChannel );
|
||||||
latestSelectedChannel = ulChannel;
|
latestSelectedChannel = ulChannel;
|
||||||
}
|
}
|
||||||
|
@ -380,7 +380,7 @@ void init( void )
|
|||||||
__libc_init_array();
|
__libc_init_array();
|
||||||
|
|
||||||
// Disable pull-up on every pin
|
// Disable pull-up on every pin
|
||||||
for (int i = 0; i < PINS_COUNT; i++)
|
for (unsigned i = 0; i < PINS_COUNT; i++)
|
||||||
digitalWrite(i, LOW);
|
digitalWrite(i, LOW);
|
||||||
|
|
||||||
// Enable parallel access on PIO output data registers
|
// Enable parallel access on PIO output data registers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user