From 35ba1547e568c662fccfbef71e0582f28beb8192 Mon Sep 17 00:00:00 2001 From: wangmengyang Date: Fri, 20 Jan 2023 10:58:06 +0800 Subject: [PATCH] bluetooth: fix that functions "coex_enable" and "coex_disable" are not used in pairs on ESP32-C3 --- components/bt/controller/esp32c3/bt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/bt/controller/esp32c3/bt.c b/components/bt/controller/esp32c3/bt.c index a97e839e7b..b368fb8c3a 100644 --- a/components/bt/controller/esp32c3/bt.c +++ b/components/bt/controller/esp32c3/bt.c @@ -1380,7 +1380,7 @@ static void bt_controller_deinit_internal(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; @@ -1435,6 +1435,9 @@ error: #endif } while (0); +#if CONFIG_SW_COEXIST_ENABLE + coex_disable(); +#endif return ret; }