mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ble(fix): deinit crash issue
This commit is contained in:
parent
08e4757764
commit
1c0fb3bb4a
@ -669,7 +669,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
#endif // CONFIG_BT_CONTROLLER_LOG_DUMP
|
#endif // CONFIG_BT_CONTROLLER_LOG_DUMP
|
||||||
if (ret != ESP_OK) {
|
if (ret != ESP_OK) {
|
||||||
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_log_init failed %d", ret);
|
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_log_init failed %d", ret);
|
||||||
goto modem_deint;
|
goto controller_init_err;
|
||||||
}
|
}
|
||||||
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
|
||||||
|
|
||||||
@ -693,11 +693,12 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
free_controller:
|
free_controller:
|
||||||
controller_sleep_deinit();
|
controller_sleep_deinit();
|
||||||
modem_deint:
|
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
controller_init_err:
|
||||||
ble_log_deinit_async();
|
ble_log_deinit_async();
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
ble_controller_deinit();
|
ble_controller_deinit();
|
||||||
|
modem_deint:
|
||||||
esp_phy_modem_deinit();
|
esp_phy_modem_deinit();
|
||||||
periph_module_disable(PERIPH_BT_MODULE);
|
periph_module_disable(PERIPH_BT_MODULE);
|
||||||
#if CONFIG_BT_NIMBLE_ENABLED
|
#if CONFIG_BT_NIMBLE_ENABLED
|
||||||
@ -721,10 +722,10 @@ esp_err_t esp_bt_controller_deinit(void)
|
|||||||
|
|
||||||
controller_sleep_deinit();
|
controller_sleep_deinit();
|
||||||
|
|
||||||
ble_controller_deinit();
|
|
||||||
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
ble_log_deinit_async();
|
ble_log_deinit_async();
|
||||||
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
|
||||||
|
ble_controller_deinit();
|
||||||
|
|
||||||
periph_module_disable(PERIPH_BT_MODULE);
|
periph_module_disable(PERIPH_BT_MODULE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user