Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes ESP32 BT Memory Releasing #8551

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cores/esp32/esp32-hal-bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@

#ifdef CONFIG_BT_ENABLED

#if CONFIG_IDF_TARGET_ESP32
bool btInUse(){ return true; }
#else
// user may want to change it to free resources
__attribute__((weak)) bool btInUse(){ return true; }
#endif

#include "esp_bt.h"

Expand Down
6 changes: 6 additions & 0 deletions cores/esp32/esp32-hal-misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,15 @@ bool verifyRollbackLater() { return false; }
#endif

#ifdef CONFIG_BT_ENABLED
#if CONFIG_IDF_TARGET_ESP32
//overwritten in esp32-hal-bt.c
bool btInUse() __attribute__((weak));
bool btInUse(){ return false; }
#else
//from esp32-hal-bt.c
extern bool btInUse();
#endif
#endif

void initArduino()
{
Expand Down