mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-25 07:17:16 +00:00
Skip not used ESP32 GPIO init
This commit is contained in:
parent
e37290217e
commit
e2b7cd96e6
@ -1850,6 +1850,10 @@ void GpioInit(void)
|
|||||||
pinMode(i, OUTPUT);
|
pinMode(i, OUTPUT);
|
||||||
digitalWrite(i, 0);
|
digitalWrite(i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Until 20210726
|
||||||
|
|
||||||
// Set any non-used GPIO to INPUT - Related to resetPins() in support_legacy_cores.ino
|
// Set any non-used GPIO to INPUT - Related to resetPins() in support_legacy_cores.ino
|
||||||
// Doing it here solves relay toggles at restart.
|
// Doing it here solves relay toggles at restart.
|
||||||
#if CONFIG_IDF_TARGET_ESP32C3
|
#if CONFIG_IDF_TARGET_ESP32C3
|
||||||
@ -1865,6 +1869,16 @@ void GpioInit(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // CONFIG_IDF_TARGET_ESP32C3
|
#endif // CONFIG_IDF_TARGET_ESP32C3
|
||||||
|
*/
|
||||||
|
#ifdef ESP8266
|
||||||
|
// Set any non-used GPIO to INPUT - Related to resetPins() in support_legacy_cores.ino
|
||||||
|
// Doing it here solves relay toggles at restart.
|
||||||
|
else if (((i < 6) || (i > 11)) && (GPIO_NONE == mpin)) { // Skip SPI flash interface
|
||||||
|
if (!((1 == i) || (3 == i))) { // Skip serial
|
||||||
|
pinMode(i, INPUT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // ESP8266
|
||||||
}
|
}
|
||||||
|
|
||||||
// Digital input
|
// Digital input
|
||||||
|
Loading…
x
Reference in New Issue
Block a user