File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ bool SoftwareSerial::isValidGPIOpin(int8_t pin) {
55
55
#ifdef CONFIG_IDF_TARGET_ESP32
56
56
// Datasheet https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf,
57
57
// 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 );
61
61
#elif CONFIG_IDF_TARGET_ESP32S2
62
62
// Datasheet https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf,
63
63
// 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) {
86
86
return isValidGPIOpin (pin)
87
87
#if defined(ESP32)
88
88
#ifdef CONFIG_IDF_TARGET_ESP32
89
- && (pin < 34 ) // GPIO34 and above are input only
89
+ && (pin < 34 )
90
90
#elif CONFIG_IDF_TARGET_ESP32S2
91
- && (pin <= 45 ) // GPIO46 is input only
91
+ && (pin <= 45 )
92
92
#elif CONFIG_IDF_TARGET_ESP32C3
93
- // they are all input and output
93
+ // no restrictions
94
94
#endif
95
95
#endif
96
96
;
You can’t perform that action at this time.
0 commit comments