Skip to content

Commit

Permalink
[ESP32] Reclaim the BLE memory as heap (#23046)
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamdp authored and pull[bot] committed Jan 16, 2024
1 parent 0ef3dc8 commit 1717378
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/platform/ESP32/nimble/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <setup_payload/AdditionalDataPayloadGenerator.h>
#include <system/SystemTimer.h>

#include "esp_bt.h"
#include "esp_log.h"
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
#include "esp_nimble_hci.h"
Expand Down Expand Up @@ -145,15 +146,14 @@ CHIP_ERROR BLEManagerImpl::_Init()
if (ConnectivityMgr().IsThreadProvisioned())
{
ESP_LOGI(TAG, "Thread credentials already provisioned, not initializing BLE");
return CHIP_NO_ERROR;
}
#else
if (ConnectivityMgr().IsWiFiStationProvisioned())
{
ESP_LOGI(TAG, "WiFi station already provisioned, not initializing BLE");
#endif /* CHIP_DEVICE_CONFIG_ENABLE_THREAD */
esp_bt_mem_release(ESP_BT_MODE_BTDM);
return CHIP_NO_ERROR;
}
#endif /* CHIP_DEVICE_CONFIG_ENABLE_THREAD */
#endif /* CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING */

CHIP_ERROR err;
Expand Down

0 comments on commit 1717378

Please sign in to comment.