From f886e3c05727f61bf2be599e38d4ab630a302c4d Mon Sep 17 00:00:00 2001 From: zhiweijian Date: Thu, 20 Apr 2023 14:46:05 +0800 Subject: [PATCH] Disable controller 5.0 feature bits if host 5.0 feature is not enabled --- components/bt/include/esp32c3/include/esp_bt.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/bt/include/esp32c3/include/esp_bt.h b/components/bt/include/esp32c3/include/esp_bt.h index 985e4181e3..3b62cf0215 100644 --- a/components/bt/include/esp32c3/include/esp_bt.h +++ b/components/bt/include/esp32c3/include/esp_bt.h @@ -157,13 +157,17 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status); #if defined (CONFIG_BT_BLE_50_FEATURES_SUPPORTED) || defined (CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT) #ifdef CONFIG_BT_BLE_50_FEATURES_SUPPORTED #define BT_CTRL_50_FEATURE_SUPPORT (CONFIG_BT_BLE_50_FEATURES_SUPPORTED) -#endif +#endif // CONFIG_BT_BLE_50_FEATURES_SUPPORTED #ifdef CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT #define BT_CTRL_50_FEATURE_SUPPORT (CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT) -#endif +#endif // CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT +#else +#if defined (CONFIG_BT_BLUEDROID_ENABLED) || defined (CONFIG_BT_NIMBLE_ENABLED) +#define BT_CTRL_50_FEATURE_SUPPORT (0) #else #define BT_CTRL_50_FEATURE_SUPPORT (1) -#endif +#endif // (CONFIG_BT_BLUEDROID_ENABLED) || (CONFIG_BT_NIMBLE_ENABLED) +#endif // (CONFIG_BT_BLE_50_FEATURES_SUPPORTED) || (CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT) #define AGC_RECORRECT_EN ((BT_CTRL_AGC_RECORRECT_EN << 0) | (BT_CTRL_CODED_AGC_RECORRECT <<1))