mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-16 18:25:10 +00:00
set GPIOs for sleep
This commit is contained in:
parent
eb0e705ba9
commit
d1db51830b
@ -277,6 +277,17 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false)
|
|||||||
if (shouldLoraWake(msecToWake)) {
|
if (shouldLoraWake(msecToWake)) {
|
||||||
enableLoraInterrupt();
|
enableLoraInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) // Applicable to most ESP32 boards?
|
||||||
|
// Avoid leakage through button pin
|
||||||
|
pinMode(0, INPUT);
|
||||||
|
rtc_gpio_hold_en((gpio_num_t)0);
|
||||||
|
|
||||||
|
// LoRa CS (RADIO_NSS) needs to stay HIGH, even during deep sleep
|
||||||
|
pinMode(LORA_CS, OUTPUT);
|
||||||
|
digitalWrite(LORA_CS, HIGH);
|
||||||
|
rtc_gpio_hold_en((gpio_num_t)LORA_CS);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
cpuDeepSleep(msecToWake);
|
cpuDeepSleep(msecToWake);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user