mirror of
https://github.com/esphome/esphome.git
synced 2024-11-13 02:37:47 +01:00
Release BT controller unused memory in the right place (#1095)
This commit is contained in:
parent
148f5d9418
commit
ca4107d450
1 changed files with 2 additions and 2 deletions
|
@ -99,14 +99,14 @@ bool ESP32BLETracker::ble_setup() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
|
||||||
|
|
||||||
// Initialize the bluetooth controller with the default configuration
|
// Initialize the bluetooth controller with the default configuration
|
||||||
if (!btStart()) {
|
if (!btStart()) {
|
||||||
ESP_LOGE(TAG, "btStart failed: %d", esp_bt_controller_get_status());
|
ESP_LOGE(TAG, "btStart failed: %d", esp_bt_controller_get_status());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
|
|
||||||
|
|
||||||
err = esp_bluedroid_init();
|
err = esp_bluedroid_init();
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
ESP_LOGE(TAG, "esp_bluedroid_init failed: %d", err);
|
ESP_LOGE(TAG, "esp_bluedroid_init failed: %d", err);
|
||||||
|
|
Loading…
Reference in a new issue