Skip to content

Commit a35bf59

Browse files
committed
reemove duplicate btInUse define
1 parent 1145aec commit a35bf59

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

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

-11
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@
1717
#if SOC_BT_SUPPORTED
1818
#ifdef CONFIG_BT_ENABLED
1919

20-
#if CONFIG_IDF_TARGET_ESP32
21-
bool btInUse() {
22-
return true;
23-
}
24-
#else
25-
// user may want to change it to free resources
26-
__attribute__((weak)) bool btInUse() {
27-
return true;
28-
}
29-
#endif
30-
3120
#include "esp_bt.h"
3221

3322
#ifdef CONFIG_BTDM_CONTROLLER_MODE_BTDM

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,11 @@ void initArduino() {
305305
if (err) {
306306
log_e("Failed to initialize NVS! Error: %u", err);
307307
}
308-
//#if defined(CONFIG_BT_ENABLED) && SOC_BT_SUPPORTED
309-
// if (!btInUse()) {
310-
// esp_bt_controller_mem_release(ESP_BT_MODE_BTDM);
311-
// }
312-
//#endif
308+
#if defined(CONFIG_BT_ENABLED) && SOC_BT_SUPPORTED
309+
if (!btInUse()) {
310+
esp_bt_controller_mem_release(ESP_BT_MODE_BTDM);
311+
}
312+
#endif
313313
init();
314314
initVariant();
315315
}

0 commit comments

Comments
 (0)