From 964304b7510d332f6a726361a58141279eff1965 Mon Sep 17 00:00:00 2001 From: GengYuchao Date: Wed, 20 Jul 2022 12:13:48 +0800 Subject: [PATCH] Change the selection based on target to function selection --- components/bt/CMakeLists.txt | 2 +- components/bt/host/nimble/Kconfig.in | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/bt/CMakeLists.txt b/components/bt/CMakeLists.txt index 9ef563dbdf..382b5df299 100644 --- a/components/bt/CMakeLists.txt +++ b/components/bt/CMakeLists.txt @@ -614,7 +614,7 @@ if(CONFIG_BT_ENABLED) ) endif() - if(CONFIG_IDF_TARGET_ESP32 OR CONFIG_IDF_TARGET_ESP32C3 OR CONFIG_IDF_TARGET_ESP32S3) + if(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE) list(APPEND srcs "host/nimble/esp-hci/src/esp_nimble_hci.c" ) diff --git a/components/bt/host/nimble/Kconfig.in b/components/bt/host/nimble/Kconfig.in index 16a3c6fd98..a668930632 100644 --- a/components/bt/host/nimble/Kconfig.in +++ b/components/bt/host/nimble/Kconfig.in @@ -628,3 +628,10 @@ config BT_NIMBLE_USE_ESP_TIMER default y help Set this option to use Esp Timer which has higher priority timer instead of FreeRTOS timer + +config BT_NIMBLE_LEGACY_VHCI_ENABLE + bool + default y if (IDF_TARGET_ESP32 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3) + default n + help + This option is used to distinguish whether a previous version of VHCI is being used