Skip to content

Commit c783918

Browse files
committed
Fixes ESP32 BT Memory Releasing
1 parent 099b432 commit c783918

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Diff for: cores/esp32/esp32-hal-bt.c

+4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@
1616

1717
#ifdef CONFIG_BT_ENABLED
1818

19+
#if CONFIG_IDF_TARGET_ESP32
20+
bool btInUse(){ return true; }
21+
#else
1922
// user may want to change it to free resources
2023
__attribute__((weak)) bool btInUse(){ return true; }
24+
#endif
2125

2226
#include "esp_bt.h"
2327

Diff for: cores/esp32/esp32-hal-misc.c

+6
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,15 @@ bool verifyRollbackLater() { return false; }
209209
#endif
210210

211211
#ifdef CONFIG_BT_ENABLED
212+
#if CONFIG_IDF_TARGET_ESP32
213+
//overwritten in esp32-hal-bt.c
214+
bool btInUse() __attribute__((weak));
215+
bool btInUse(){ return false; }
216+
#else
212217
//from esp32-hal-bt.c
213218
extern bool btInUse();
214219
#endif
220+
#endif
215221

216222
void initArduino()
217223
{

0 commit comments

Comments
 (0)