Skip to content

Commit 5cc6294

Browse files
authored
Revert "Release memory from CLASSIC_BT when not enabled"
1 parent d83112b commit 5cc6294

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cpp_utils/BLEDevice.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,13 @@ BLEAdvertising* BLEDevice::m_bleAdvertising = nullptr;
350350
}
351351

352352
#ifndef CLASSIC_BT_ENABLED
353-
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
353+
// esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); //FIXME waiting for response from esp-idf issue
354+
errRc = esp_bt_controller_enable(ESP_BT_MODE_BLE);
355+
//errRc = esp_bt_controller_enable(ESP_BT_MODE_BTDM);
356+
if (errRc != ESP_OK) {
357+
ESP_LOGE(LOG_TAG, "esp_bt_controller_enable: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
358+
return;
359+
}
354360
#else
355361
errRc = esp_bt_controller_enable(ESP_BT_MODE_BTDM);
356362
if (errRc != ESP_OK) {

0 commit comments

Comments
 (0)