mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_crash_when_shutdown_bt_v4.3' into 'release/v4.3'
component/bt: fix crash when shutdown bt(backport v4.3) See merge request espressif/esp-idf!15709
This commit is contained in:
commit
050fd07486
@ -244,6 +244,8 @@ extern uint8_t coex_schm_curr_period_get(void);
|
|||||||
extern void * coex_schm_curr_phase_get(void);
|
extern void * coex_schm_curr_phase_get(void);
|
||||||
extern int coex_wifi_channel_get(uint8_t *primary, uint8_t *secondary);
|
extern int coex_wifi_channel_get(uint8_t *primary, uint8_t *secondary);
|
||||||
extern int coex_register_wifi_channel_change_callback(void *cb);
|
extern int coex_register_wifi_channel_change_callback(void *cb);
|
||||||
|
/* Shutdown */
|
||||||
|
extern void esp_bt_controller_shutdown(void);
|
||||||
|
|
||||||
extern char _bss_start_btdm;
|
extern char _bss_start_btdm;
|
||||||
extern char _bss_end_btdm;
|
extern char _bss_end_btdm;
|
||||||
@ -1556,13 +1558,13 @@ esp_err_t esp_bt_controller_deinit(void)
|
|||||||
|
|
||||||
static void bt_shutdown(void)
|
static void bt_shutdown(void)
|
||||||
{
|
{
|
||||||
esp_err_t ret = ESP_OK;
|
if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_ENABLED) {
|
||||||
ESP_LOGD(BTDM_LOG_TAG, "stop Bluetooth");
|
return;
|
||||||
|
|
||||||
ret = esp_bt_controller_disable();
|
|
||||||
if (ESP_OK != ret) {
|
|
||||||
ESP_LOGW(BTDM_LOG_TAG, "controller disable ret=%d", ret);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
esp_bt_controller_shutdown();
|
||||||
|
esp_phy_disable();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user