diff --git a/cores/esp32/esp32-hal-bt.c b/cores/esp32/esp32-hal-bt.c
index 5f1148bd492..43c9fbe98f7 100644
--- a/cores/esp32/esp32-hal-bt.c
+++ b/cores/esp32/esp32-hal-bt.c
@@ -17,17 +17,6 @@
 #if SOC_BT_SUPPORTED
 #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"
 
 #ifdef CONFIG_BTDM_CONTROLLER_MODE_BTDM
diff --git a/cores/esp32/esp32-hal-misc.c b/cores/esp32/esp32-hal-misc.c
index 50e2973d27a..477ee7421b5 100644
--- a/cores/esp32/esp32-hal-misc.c
+++ b/cores/esp32/esp32-hal-misc.c
@@ -27,6 +27,15 @@
 #include "esp_private/startup_internal.h"
 #if defined(CONFIG_BT_ENABLED) && SOC_BT_SUPPORTED
 #include "esp_bt.h"
+#if CONFIG_IDF_TARGET_ESP32
+bool btInUse() {
+  return true;
+}
+#else
+bool btInUse() {
+  return false;
+}
+#endif
 #endif  //CONFIG_BT_ENABLED
 #include <sys/time.h>
 #include "soc/rtc.h"
@@ -243,19 +252,6 @@ bool verifyRollbackLater() {
 }
 #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
-
 #if CONFIG_SPIRAM_SUPPORT || CONFIG_SPIRAM
 ESP_SYSTEM_INIT_FN(init_psram_new, CORE, BIT(0), 99) {
   psramInit();