Skip to content

Commit a04c324

Browse files
authored
esp8285: properly initialize free gpio as input (#7165)
1 parent 631f66b commit a04c324

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

cores/esp8266/core_esp8266_wiring_digital.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,9 @@ extern void __attachInterrupt(uint8_t pin, voidFuncPtr userFunc, int mode)
236236
}
237237

238238
extern void __resetPins() {
239-
for (int i = 0; i <= 5; ++i) {
240-
pinMode(i, INPUT);
241-
}
242-
// pins 6-11 are used for the SPI flash interface
243-
for (int i = 12; i <= 16; ++i) {
244-
pinMode(i, INPUT);
239+
for (int i = 0; i <= 16; ++i) {
240+
if (!isFlashInterfacePin(i))
241+
pinMode(i, INPUT);
245242
}
246243
}
247244

0 commit comments

Comments
 (0)