Unverified Commit f1eacf75 authored by Me No Dev's avatar Me No Dev Committed by GitHub

Merge pull request #8551 from SuGlider/btInUse

Fixes ESP32 BT Memory Releasing
parents 099b432d c7839182
...@@ -16,8 +16,12 @@ ...@@ -16,8 +16,12 @@
#ifdef CONFIG_BT_ENABLED #ifdef CONFIG_BT_ENABLED
#if CONFIG_IDF_TARGET_ESP32
bool btInUse(){ return true; }
#else
// user may want to change it to free resources // user may want to change it to free resources
__attribute__((weak)) bool btInUse(){ return true; } __attribute__((weak)) bool btInUse(){ return true; }
#endif
#include "esp_bt.h" #include "esp_bt.h"
......
...@@ -209,9 +209,15 @@ bool verifyRollbackLater() { return false; } ...@@ -209,9 +209,15 @@ bool verifyRollbackLater() { return false; }
#endif #endif
#ifdef CONFIG_BT_ENABLED #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 //from esp32-hal-bt.c
extern bool btInUse(); extern bool btInUse();
#endif #endif
#endif
void initArduino() void initArduino()
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment