Skip to content

Commit

Permalink
fix error + enable nimble deinit
Browse files Browse the repository at this point in the history
  • Loading branch information
mverch67 committed Apr 11, 2024
1 parent 41d308d commit 30b2665
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nimble/NimbleBluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/sleep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 30b2665

Please sign in to comment.