Update HardwareSerial.cpp

This commit is contained in:
me-no-dev
2020-05-13 19:26:34 +03:00
parent ce64a26ce3
commit 4b9f70236f

View File

@ -56,8 +56,13 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
end(); end();
} }
if(_uart_nr == 0 && rxPin < 0 && txPin < 0) { if(_uart_nr == 0 && rxPin < 0 && txPin < 0) {
#if CONFIG_IDF_TARGET_ESP32
rxPin = 3; rxPin = 3;
txPin = 1; txPin = 1;
#elif CONFIG_IDF_TARGET_ESP32S2
rxPin = 44;
txPin = 43;
#endif
} }
if(_uart_nr == 1 && rxPin < 0 && txPin < 0) { if(_uart_nr == 1 && rxPin < 0 && txPin < 0) {
rxPin = RX1; rxPin = RX1;