]> granicus.if.org Git - esp-idf/commitdiff
component/bt: allow to use alternative Bluetooth stack by disabling Bluedroid
authorMatthias Ringwald <matthias@ringwald.ch>
Tue, 7 Mar 2017 17:20:33 +0000 (18:20 +0100)
committerAngus Gratton <angus@espressif.com>
Wed, 22 Mar 2017 07:13:25 +0000 (15:13 +0800)
Merges #408 https://github.com/espressif/esp-idf/pull/440

components/bt/Kconfig
components/bt/component.mk

index 63dce8d1f93166ddd491beb3c2d1e5f41596bea6..9b329e61e29841138fbb2302b87cb0496b121904 100644 (file)
@@ -1,7 +1,14 @@
 menuconfig BT_ENABLED
     bool "Bluetooth"
     help
-        Select this option to enable Bluetooth stack and show the submenu with Bluetooth configuration choices.
+        Select this option to enable Bluetooth and show the submenu with Bluetooth configuration choices.
+
+config BLUEDROID_ENABLED
+       bool "Bluedroid Bluetooth stack enabled"
+    depends on BT_ENABLED
+       default y
+       help
+               This enables the default Bluedroid Bluetooth stack
 
 config BTC_TASK_STACK_SIZE
        int "Bluetooth event (callback to application) task stack size"
index 12cc088412cd6626ba911bd12cfae20c5c7595e3..f93cc5204ae58251c092eb1b246766621a82b564 100644 (file)
@@ -3,7 +3,26 @@
 #
 ifdef CONFIG_BT_ENABLED
 
-COMPONENT_ADD_INCLUDEDIRS :=   bluedroid/bta/include                   \
+COMPONENT_SRCDIRS := .
+
+COMPONENT_ADD_INCLUDEDIRS := include
+
+LIBS := btdm_app
+
+COMPONENT_ADD_LDFLAGS     := -lbt -L $(COMPONENT_PATH)/lib \
+                           $(addprefix -l,$(LIBS))
+
+# re-link program if BT binary libs change
+COMPONENT_ADD_LINKER_DEPS := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS))
+
+COMPONENT_SUBMODULES += lib
+
+endif
+
+
+ifdef CONFIG_BLUEDROID_ENABLED
+
+COMPONENT_ADD_INCLUDEDIRS +=   bluedroid/bta/include                   \
                                bluedroid/bta/sys/include               \
                                bluedroid/btcore/include                \
                                bluedroid/device/include                \
@@ -29,17 +48,8 @@ COMPONENT_ADD_INCLUDEDIRS := bluedroid/bta/include                   \
                                bluedroid/stack/include                 \
                                bluedroid/api/include           \
                                bluedroid/include                       \
-                               include 
-
-LIBS := btdm_app
-
-COMPONENT_ADD_LDFLAGS := -lbt -L $(COMPONENT_PATH)/lib \
-                           $(addprefix -l,$(LIBS))
-
-# re-link program if BT binary libs change
-COMPONENT_ADD_LINKER_DEPS := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS))
 
-COMPONENT_SRCDIRS :=   bluedroid/bta/dm                        \
+COMPONENT_SRCDIRS +=   bluedroid/bta/dm                        \
                        bluedroid/bta/gatt                      \
                        bluedroid/bta/hh                        \
                        bluedroid/bta/sdp                       \
@@ -69,8 +79,5 @@ COMPONENT_SRCDIRS :=  bluedroid/bta/dm                        \
                        bluedroid/stack                         \
                        bluedroid/api                   \
                        bluedroid                               \
-                       .
-
-COMPONENT_SUBMODULES += lib
 
 endif