bluetooth: fix that functions "coex_enable" and "coex_disable" are not used in pairs on ESP32-C3 and ESP32-S3

This commit is contained in:
wangmengyang
2023-01-20 10:53:52 +08:00
parent 800dec96e9
commit 86b2779adc
2 changed files with 8 additions and 2 deletions

View File

@ -1425,7 +1425,7 @@ esp_err_t esp_bt_controller_deinit(void)
esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
{
int ret = ESP_OK;
esp_err_t ret = ESP_OK;
if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_INITED) {
return ESP_ERR_INVALID_STATE;
@ -1480,6 +1480,9 @@ error:
#endif
} while (0);
#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
return ret;
}

View File

@ -1472,7 +1472,7 @@ esp_err_t esp_bt_controller_deinit(void)
esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
{
int ret = ESP_OK;
esp_err_t ret = ESP_OK;
if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_INITED) {
return ESP_ERR_INVALID_STATE;
@ -1527,6 +1527,9 @@ error:
#endif
} while (0);
#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
return ret;
}