mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
fix(blufi): Fixed blufi init fail after deinit
(cherry picked from commit 7addb57ccd53576b40d3cfeb24c185036053f4b4) Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
This commit is contained in:
parent
722a69a1f7
commit
00f6929123
@ -1397,7 +1397,8 @@ static esp_err_t esp_bt_controller_rom_mem_release(esp_bt_mode_t mode)
|
||||
|
||||
//already released
|
||||
if (!(mode & btdm_dram_available_region[0].mode)) {
|
||||
return ESP_ERR_INVALID_STATE;
|
||||
ESP_LOGW(BTDM_LOG_TAG, "%s already released, mode %d",__func__, mode);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
for (int i = 0; i < sizeof(btdm_dram_available_region)/sizeof(btdm_dram_available_region_t); i++) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
@ -311,7 +311,7 @@ static void example_event_callback(esp_blufi_cb_event_t event, esp_blufi_cb_para
|
||||
ESP_ERROR_CHECK( esp_wifi_set_mode(param->wifi_mode.op_mode) );
|
||||
break;
|
||||
case ESP_BLUFI_EVENT_REQ_CONNECT_TO_AP:
|
||||
BLUFI_INFO("BLUFI requset wifi connect to AP\n");
|
||||
BLUFI_INFO("BLUFI request wifi connect to AP\n");
|
||||
/* there is no wifi callback when the device has already connected to this wifi
|
||||
so disconnect wifi before connection.
|
||||
*/
|
||||
@ -319,7 +319,7 @@ static void example_event_callback(esp_blufi_cb_event_t event, esp_blufi_cb_para
|
||||
example_wifi_connect();
|
||||
break;
|
||||
case ESP_BLUFI_EVENT_REQ_DISCONNECT_FROM_AP:
|
||||
BLUFI_INFO("BLUFI requset wifi disconnect from AP\n");
|
||||
BLUFI_INFO("BLUFI request wifi disconnect from AP\n");
|
||||
esp_wifi_disconnect();
|
||||
break;
|
||||
case ESP_BLUFI_EVENT_REPORT_ERROR:
|
||||
|
Loading…
x
Reference in New Issue
Block a user