Skip to content

Commit ede39b6

Browse files
authored
fix: UART0 boot pin setup
UART0 pins are set by ROM Boot to default values. This must be reflected into Arduino HardwareSerial in order to allow it to correctly detach it and then attach it to something else. Summary: UART0 constructor sets default RX/TX pins as done in boot time.
1 parent 75b7f4b commit ede39b6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/esp32/HardwareSerial.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ _eventTask(NULL)
9999
}
100100
}
101101
#endif
102+
// do the same as boot time, that will set default UART0 pins RX, TX.
103+
if(uart_nr == 0) uartSetPins(0, SOC_RX0, SOC_TX0, -1, -1);
102104
}
103105

104106
HardwareSerial::~HardwareSerial()

0 commit comments

Comments
 (0)