kopia lustrzana https://github.com/meshtastic/firmware
Fix immediate wake from deepsleep for some devices (#3884)
Affects ESP32 boards without an external pull-up on the defined user-button pin.pull/3890/head
rodzic
a9a208de73
commit
2388eb91ae
|
@ -264,7 +264,11 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false)
|
|||
#ifdef BUTTON_PIN
|
||||
// Avoid leakage through button pin
|
||||
if (GPIO_IS_VALID_OUTPUT_GPIO(BUTTON_PIN)) {
|
||||
#ifdef BUTTON_NEED_PULLUP
|
||||
pinMode(BUTTON_PIN, INPUT_PULLUP);
|
||||
#else
|
||||
pinMode(BUTTON_PIN, INPUT);
|
||||
#endif
|
||||
gpio_hold_en((gpio_num_t)BUTTON_PIN);
|
||||
}
|
||||
#endif
|
||||
|
|
Ładowanie…
Reference in New Issue