Skip to content

Commit

Permalink
fix: UART0 boot pin setup (#9373)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SuGlider committed Mar 18, 2024
1 parent 2dcb28f commit 5e89e50
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cores/esp32/HardwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ _eventTask(NULL)
}
}
#endif
// do the same as boot time, that will set default UART0 pins RX, TX.
if(uart_nr == 0) uartSetPins(0, SOC_RX0, SOC_TX0, -1, -1);
}

HardwareSerial::~HardwareSerial()
Expand Down

0 comments on commit 5e89e50

Please sign in to comment.