mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-18 11:02:16 +00:00
Merge branch 'master' into tft-gui-work
This commit is contained in:
commit
5a6bc001d8
@ -112,6 +112,12 @@ void NimbleBluetooth::shutdown()
|
|||||||
NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising();
|
NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising();
|
||||||
pAdvertising->reset();
|
pAdvertising->reset();
|
||||||
pAdvertising->stop();
|
pAdvertising->stop();
|
||||||
|
|
||||||
|
#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0)
|
||||||
|
// Saving of ~1mA
|
||||||
|
// Probably applicable to other ESP32 boards - unverified
|
||||||
|
NimBLEDevice::deinit();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NimbleBluetooth::isActive()
|
bool NimbleBluetooth::isActive()
|
||||||
|
@ -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(BUTTON_PIN, INPUT);
|
||||||
|
rtc_gpio_hold_en((gpio_num_t)BUTTON_PIN);
|
||||||
|
|
||||||
|
// 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