diff --git a/cores/esp32/esp32-hal-bt.c b/cores/esp32/esp32-hal-bt.c index d17a761bebd..7b6a54e1ad4 100644 --- a/cores/esp32/esp32-hal-bt.c +++ b/cores/esp32/esp32-hal-bt.c @@ -16,7 +16,8 @@ #ifdef CONFIG_BT_ENABLED -bool btInUse(){ return true; } +// user may want to change it to free resources +__attribute__((weak)) bool btInUse(){ return true; } #include "esp_bt.h" diff --git a/cores/esp32/esp32-hal-misc.c b/cores/esp32/esp32-hal-misc.c index 1a71b0e86f9..9bc1b3a3a8e 100644 --- a/cores/esp32/esp32-hal-misc.c +++ b/cores/esp32/esp32-hal-misc.c @@ -209,9 +209,8 @@ bool verifyRollbackLater() { return false; } #endif #ifdef CONFIG_BT_ENABLED -//overwritten in esp32-hal-bt.c -bool btInUse() __attribute__((weak)); -bool btInUse(){ return false; } +//from esp32-hal-bt.c +extern bool btInUse(); #endif void initArduino()