8000 Merge pull request #696 from toxuin/bt-classic-release · perody/esp32-snippets@25e694e · GitHub
[go: up one dir, main page]

Skip to content

Commit 25e694e

Browse files
authored
Merge pull request nkolban#696 from toxuin/bt-classic-release
Release memory from CLASSIC_BT when not enabled
2 parents def0952 + bd24fab commit 25e694e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

cpp_utils/BLEDevice.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,7 @@ BLEAdvertising* BLEDevice::m_bleAdvertising = nullptr;
354354
}
355355

356356
#ifndef CLASSIC_BT_ENABLED
357-
// esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT); //FIXME waiting for response from esp-idf issue
358-
errRc = esp_bt_controller_enable(ESP_BT_MODE_BLE);
359-
//errRc = esp_bt_controller_enable(ESP_BT_MODE_BTDM);
360-
if (errRc != ESP_OK) {
361-
ESP_LOGE(LOG_TAG, "esp_bt_controller_enable: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
362-
return;
363-
}
357+
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
364358
#else
365359
errRc = esp_bt_controller_enable(ESP_BT_MODE_BTDM);
366360
if (errRc != ESP_OK) {

0 commit comments

Comments
 (0)
0