Skip to content

Commit 739bcd3

Browse files
dok-netd-a-v
authored andcommitted
Updated EspSoftwareSerial brings backward compatibility for ctor/begin() pair (only for the common cases with complete default argument use) (#6746)
1 parent 43e0554 commit 739bcd3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

libraries/ESP8266WiFi/examples/WiFiTelnetToSerial/WiFiTelnetToSerial.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ void setup() {
8585
Serial.swap();
8686
// Hardware serial is now on RX:GPIO13 TX:GPIO15
8787
// use SoftwareSerial on regular RX(3)/TX(1) for logging
88-
logger = new SoftwareSerial();
89-
logger->begin(BAUD_LOGGER, 3, 1);
88+
logger = new SoftwareSerial(3, 1);
89+
logger->begin(BAUD_LOGGER);
9090
logger->enableIntTx(false);
9191
logger->println("\n\nUsing SoftwareSerial for logging");
9292
#else

libraries/esp8266/examples/SerialStress/SerialStress.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ void setup() {
7272

7373
// using HardwareSerial0 pins,
7474
// so we can still log to the regular usbserial chips
75-
SoftwareSerial* ss = new SoftwareSerial;
76-
ss->begin(SSBAUD, 3, 1);
75+
SoftwareSerial* ss = new SoftwareSerial(3, 1);
76+
ss->begin(SSBAUD);
7777
ss->enableIntTx(false);
7878
logger = ss;
7979
logger->println();

0 commit comments

Comments
 (0)