mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_blufi_deinit_fail_v5.3' into 'release/v5.3'
fix(nimble): Fixed deinit sequence in blufi (v5.3) See merge request espressif/esp-idf!33768
This commit is contained in:
commit
c302ea2e71
@ -442,8 +442,10 @@ uint8_t esp_blufi_init(void)
|
||||
void esp_blufi_deinit(void)
|
||||
{
|
||||
blufi_env.enabled = false;
|
||||
btc_msg_t msg;
|
||||
esp_blufi_cb_param_t param;
|
||||
btc_msg_t msg;
|
||||
memset (&msg, 0x0, sizeof (msg));
|
||||
msg.sig = BTC_SIG_API_CB;
|
||||
msg.pid = BTC_PID_BLUFI;
|
||||
msg.act = ESP_BLUFI_EVENT_DEINIT_FINISH;
|
||||
param.deinit_finish.state = ESP_BLUFI_DEINIT_OK;
|
||||
|
@ -233,6 +233,12 @@ esp_err_t esp_blufi_host_deinit(void)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
|
||||
ret = nimble_port_stop();
|
||||
|
||||
if (ret == 0) {
|
||||
esp_nimble_deinit();
|
||||
}
|
||||
|
||||
ret = esp_blufi_profile_deinit();
|
||||
if(ret != ESP_OK) {
|
||||
return ret;
|
||||
@ -240,11 +246,6 @@ esp_err_t esp_blufi_host_deinit(void)
|
||||
|
||||
esp_blufi_btc_deinit();
|
||||
|
||||
ret = nimble_port_stop();
|
||||
if (ret == 0) {
|
||||
esp_nimble_deinit();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user