File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
components/bt/common/btc/profile/esp/blufi/nimble_host
examples/bluetooth/blufi/main Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -442,8 +442,10 @@ uint8_t esp_blufi_init(void)
442442void esp_blufi_deinit (void )
443443{
444444 blufi_env .enabled = false;
445- btc_msg_t msg ;
446445 esp_blufi_cb_param_t param ;
446+ btc_msg_t msg ;
447+ memset (& msg , 0x0 , sizeof (msg ));
448+ msg .sig = BTC_SIG_API_CB ;
447449 msg .pid = BTC_PID_BLUFI ;
448450 msg .act = ESP_BLUFI_EVENT_DEINIT_FINISH ;
449451 param .deinit_finish .state = ESP_BLUFI_DEINIT_OK ;
Original file line number Diff line number Diff line change @@ -233,18 +233,19 @@ esp_err_t esp_blufi_host_deinit(void)
233233{
234234 esp_err_t ret = ESP_OK ;
235235
236+ ret = nimble_port_stop ();
237+
238+ if (ret == 0 ) {
239+ esp_nimble_deinit ();
240+ }
241+
236242 ret = esp_blufi_profile_deinit ();
237243 if (ret != ESP_OK ) {
238244 return ret ;
239245 }
240246
241247 esp_blufi_btc_deinit ();
242248
243- ret = nimble_port_stop ();
244- if (ret == 0 ) {
245- esp_nimble_deinit ();
246- }
247-
248249 return ret ;
249250}
250251
You can’t perform that action at this time.
0 commit comments