Skip to content

Commit a23721a

Browse files
committed
Enable pull-up on pin 0. (for real...)
1 parent 9784c1f commit a23721a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hardware/arduino/sam/variants/arduino_due_x/variant.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ void init( void )
348348
// Initialize C library
349349
__libc_init_array();
350350

351-
// Disable pull-up on every pin except RX0
352-
for (int i = 1; i < PINS_COUNT; i++)
351+
// Disable pull-up on every pin
352+
for (int i = 0; i < PINS_COUNT; i++)
353353
digitalWrite(i, LOW);
354354

355355
// Initialize Serial port U(S)ART pins
@@ -358,6 +358,7 @@ void init( void )
358358
g_APinDescription[PINS_UART].ulPinType,
359359
g_APinDescription[PINS_UART].ulPin,
360360
g_APinDescription[PINS_UART].ulPinConfiguration);
361+
digitalWrite(0, HIGH); // Enable pullup for RX0
361362
PIO_Configure(
362363
g_APinDescription[PINS_USART0].pPort,
363364
g_APinDescription[PINS_USART0].ulPinType,

0 commit comments

Comments
 (0)