mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
parent
1c6a57e15d
commit
4b3db72a46
@ -150,7 +150,7 @@ uint32_t analogRead(uint32_t ulPin)
|
||||
// Enable the corresponding channel
|
||||
if (ulChannel != latestSelectedChannel) {
|
||||
adc_enable_channel( ADC, ulChannel );
|
||||
if ( latestSelectedChannel != -1 )
|
||||
if ( latestSelectedChannel != (uint32_t)-1 )
|
||||
adc_disable_channel( ADC, latestSelectedChannel );
|
||||
latestSelectedChannel = ulChannel;
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ void init( void )
|
||||
__libc_init_array();
|
||||
|
||||
// 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);
|
||||
|
||||
// Enable parallel access on PIO output data registers
|
||||
|
Loading…
Reference in New Issue
Block a user