mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
bugfix: deinit ble for specifies ESP_BT_MODE_BTDM
This commit is contained in:
committed by
InfiniteYuan
parent
ef4b1b7704
commit
3cc5ad7ac4
@@ -816,8 +816,8 @@ esp_err_t esp_bt_mem_release(esp_bt_mode_t mode)
|
|||||||
{
|
{
|
||||||
intptr_t mem_start, mem_end;
|
intptr_t mem_start, mem_end;
|
||||||
|
|
||||||
if (mode == ESP_BT_MODE_BLE) {
|
if (mode & ESP_BT_MODE_BLE) {
|
||||||
mem_start = (intptr_t)&_bt_bss_start;
|
mem_start = (intptr_t)&_bt_bss_start;
|
||||||
mem_end = (intptr_t)&_bt_bss_end;
|
mem_end = (intptr_t)&_bt_bss_end;
|
||||||
if (mem_start != mem_end) {
|
if (mem_start != mem_end) {
|
||||||
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release BT BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
|
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release BT BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
|
||||||
@@ -832,18 +832,18 @@ esp_err_t esp_bt_mem_release(esp_bt_mode_t mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
mem_start = (intptr_t)&_nimble_bss_start;
|
mem_start = (intptr_t)&_nimble_bss_start;
|
||||||
mem_end = (intptr_t)&_nimble_bss_end;
|
mem_end = (intptr_t)&_nimble_bss_end;
|
||||||
if (mem_start != mem_end) {
|
if (mem_start != mem_end) {
|
||||||
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
|
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
|
||||||
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
|
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
|
||||||
}
|
}
|
||||||
|
|
||||||
mem_start = (intptr_t)&_nimble_data_start;
|
mem_start = (intptr_t)&_nimble_data_start;
|
||||||
mem_end = (intptr_t)&_nimble_data_end;
|
mem_end = (intptr_t)&_nimble_data_end;
|
||||||
if (mem_start != mem_end) {
|
if (mem_start != mem_end) {
|
||||||
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE Data [0x%08x] - [0x%08x]", mem_start, mem_end);
|
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE Data [0x%08x] - [0x%08x]", mem_start, mem_end);
|
||||||
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
|
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
|
@@ -790,7 +790,7 @@ esp_err_t esp_bt_mem_release(esp_bt_mode_t mode)
|
|||||||
{
|
{
|
||||||
intptr_t mem_start, mem_end;
|
intptr_t mem_start, mem_end;
|
||||||
|
|
||||||
if (mode == ESP_BT_MODE_BLE) {
|
if (mode & ESP_BT_MODE_BLE) {
|
||||||
mem_start = (intptr_t)&_bt_bss_start;
|
mem_start = (intptr_t)&_bt_bss_start;
|
||||||
mem_end = (intptr_t)&_bt_bss_end;
|
mem_end = (intptr_t)&_bt_bss_end;
|
||||||
if (mem_start != mem_end) {
|
if (mem_start != mem_end) {
|
||||||
|
Reference in New Issue
Block a user