diff --git a/src/nimble/NimbleBluetooth.cpp b/src/nimble/NimbleBluetooth.cpp index 0b91bf44f4..42b296e457 100644 --- a/src/nimble/NimbleBluetooth.cpp +++ b/src/nimble/NimbleBluetooth.cpp @@ -113,8 +113,8 @@ void NimbleBluetooth::shutdown() pAdvertising->reset(); pAdvertising->stop(); -#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) - // Saving of ~1mA +#if defined(ARCH_ESP32) + // Saving of ~1mA for esp32-s3 and 0.1mA for esp32 // Probably applicable to other ESP32 boards - unverified NimBLEDevice::deinit(); #endif diff --git a/src/sleep.cpp b/src/sleep.cpp index b128a69812..7ed2641834 100644 --- a/src/sleep.cpp +++ b/src/sleep.cpp @@ -249,9 +249,11 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false) if (shouldLoraWake(msecToWake)) { enableLoraInterrupt(); } +#ifdef BUTTON_PIN // Avoid leakage through button pin pinMode(BUTTON_PIN, INPUT); gpio_hold_en((gpio_num_t)BUTTON_PIN); +#endif // LoRa CS (RADIO_NSS) needs to stay HIGH, even during deep sleep pinMode(LORA_CS, OUTPUT);