Skip to content

Commit 1e081f6

Browse files
committed
Minimize diff to master branch.
1 parent ea52159 commit 1e081f6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/SoftwareSerial.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ bool SoftwareSerial::isValidGPIOpin(int8_t pin) {
5555
#ifdef CONFIG_IDF_TARGET_ESP32
5656
// Datasheet https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf,
5757
// Pinout https://docs.espressif.com/projects/esp-idf/en/latest/esp32/_images/esp32-devkitC-v4-pinout.jpg
58-
return (pin == 1) || (pin >= 3 && pin <= 4) || (pin >= 13 && pin <= 14) ||
59-
(pin >= 16 && pin <= 19) || (pin >= 21 && pin <= 23) || (pin >= 25 && pin <= 27) ||
60-
(pin >= 32 && pin <= 39);
58+
return (pin == 1) || (pin >= 3 && pin <= 4) ||
59+
(pin >= 13 && pin <= 14) || (pin >= 16 && pin <= 19) ||
60+
(pin >= 21 && pin <= 23) || (pin >= 25 && pin <= 27) || (pin >= 32 && pin <= 39);
6161
#elif CONFIG_IDF_TARGET_ESP32S2
6262
// Datasheet https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf,
6363
// Pinout https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/_images/esp32-s2_saola1-pinout.jpg
@@ -86,11 +86,11 @@ bool SoftwareSerial::isValidTxGPIOpin(int8_t pin) {
8686
return isValidGPIOpin(pin)
8787
#if defined(ESP32)
8888
#ifdef CONFIG_IDF_TARGET_ESP32
89-
&& (pin < 34) // GPIO34 and above are input only
89+
&& (pin < 34)
9090
#elif CONFIG_IDF_TARGET_ESP32S2
91-
&& (pin <= 45) // GPIO46 is input only
91+
&& (pin <= 45)
9292
#elif CONFIG_IDF_TARGET_ESP32C3
93-
// they are all input and output
93+
// no restrictions
9494
#endif
9595
#endif
9696
;

0 commit comments

Comments
 (0)