forked from espressif/arduino-esp32
Update HardwareSerial.cpp
This commit is contained in:
@ -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;
|
||||||
|
Reference in New Issue
Block a user