From 338d9f40d9c7334fa57fec1f44a1bb9266904b23 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Wed, 31 Jul 2024 12:59:27 +0530 Subject: [PATCH] fix(wifi_prov): Add support for ESP IP controller chips in bluedroid --- components/protocomm/src/simple_ble/simple_ble.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/components/protocomm/src/simple_ble/simple_ble.c b/components/protocomm/src/simple_ble/simple_ble.c index f892245170b0..370cc91d440b 100644 --- a/components/protocomm/src/simple_ble/simple_ble.c +++ b/components/protocomm/src/simple_ble/simple_ble.c @@ -241,14 +241,15 @@ esp_err_t simple_ble_start(simple_ble_cfg_t *cfg) return ret; } -#ifdef CONFIG_BTDM_CTRL_MODE_BTDM - ret = esp_bt_controller_enable(ESP_BT_MODE_BTDM); -#elif defined CONFIG_BTDM_CTRL_MODE_BLE_ONLY || CONFIG_BT_CTRL_MODE_EFF - ret = esp_bt_controller_enable(ESP_BT_MODE_BLE); -#else +#ifdef CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY ESP_LOGE(TAG, "Configuration mismatch. Select BLE Only or BTDM mode from menuconfig"); return ESP_FAIL; +#elif CONFIG_BTDM_CTRL_MODE_BTDM + ret = esp_bt_controller_enable(ESP_BT_MODE_BTDM); +#else //For all other chips supporting BLE Only + ret = esp_bt_controller_enable(ESP_BT_MODE_BLE); #endif + if (ret) { ESP_LOGE(TAG, "%s enable controller failed %d", __func__, ret); return ret;