Bluetooth: Permit connectionless host-controller combined build
In a host plus controller combined build, if no connection is required, deselect CONFIG_BLUETOOTH_MAX_CONN. This will reduce RAM and ROM usage in the controller. Also, make BLUETOOTH_PERIPHERAL, BLUETOOTH_CENTRAL and BLUETOOTH_CONN switches accessible by the controller kconfig to select the right roles to enable. Change-id: I164cf696ab2a6f4859086d2cb18f6d3f2b1399d3 Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
parent
981f2d3fdb
commit
cced2aea30
2 changed files with 40 additions and 35 deletions
|
@ -1,6 +1,7 @@
|
|||
# Kconfig - Bluetooth LE stack configuration options
|
||||
|
||||
#
|
||||
# Copyright (c) 2016-2017 Nordic Semiconductor ASA
|
||||
# Copyright (c) 2015-2016 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
@ -23,13 +24,39 @@ config BLUETOOTH_UART_TO_HOST_DEV_NAME
|
|||
to connect to an external Bluetooth Host when Zephyr is
|
||||
acting as a Bluetooth Controller.
|
||||
|
||||
# Virtual/hidden option to make the conditions more intuitive
|
||||
config BLUETOOTH_HCI_HOST
|
||||
# Virtual/hidden option to make the conditions more intuitive
|
||||
bool
|
||||
default y
|
||||
depends on !BLUETOOTH_HCI_RAW
|
||||
select POLL
|
||||
|
||||
config BLUETOOTH_PERIPHERAL
|
||||
bool "Peripheral Role support"
|
||||
select BLUETOOTH_CONN
|
||||
default y if BLUETOOTH_HCI_RAW
|
||||
help
|
||||
Select this for LE Peripheral role support.
|
||||
|
||||
config BLUETOOTH_CENTRAL
|
||||
bool "Central Role support"
|
||||
select BLUETOOTH_CONN
|
||||
default y if BLUETOOTH_HCI_RAW
|
||||
help
|
||||
Select this for LE Central role support.
|
||||
|
||||
config BLUETOOTH_CONN
|
||||
bool
|
||||
|
||||
config BLUETOOTH_MAX_CONN
|
||||
int "Maximum number of simultaneous connections"
|
||||
depends on BLUETOOTH_CONN
|
||||
range 1 64
|
||||
default 1
|
||||
help
|
||||
Maximum number of simultaneous Bluetooth connections
|
||||
supported.
|
||||
|
||||
config BLUETOOTH_HCI_CMD_COUNT
|
||||
int "Number of HCI command buffers"
|
||||
default 2
|
||||
|
@ -116,21 +143,6 @@ config BLUETOOTH_INTERNAL_STORAGE
|
|||
persistent storage handlers through the bt_storage API, rather
|
||||
an internal default handler is used for this.
|
||||
|
||||
config BLUETOOTH_PERIPHERAL
|
||||
bool "Peripheral Role support"
|
||||
select BLUETOOTH_CONN
|
||||
help
|
||||
Select this for LE Peripheral role support.
|
||||
|
||||
config BLUETOOTH_CENTRAL
|
||||
bool "Central Role support"
|
||||
select BLUETOOTH_CONN
|
||||
help
|
||||
Select this for LE Central role support.
|
||||
|
||||
config BLUETOOTH_CONN
|
||||
bool
|
||||
|
||||
if BLUETOOTH_CONN
|
||||
config BLUETOOTH_L2CAP_TX_BUF_COUNT
|
||||
int "Number of L2CAP TX buffers"
|
||||
|
@ -268,15 +280,6 @@ config BLUETOOTH_TINYCRYPT_ECC
|
|||
option injects support for the 2 HCI commands required for LE Secure
|
||||
Connections so that Hosts can make use of those.
|
||||
|
||||
config BLUETOOTH_MAX_CONN
|
||||
int "Maximum number of simultaneous connections"
|
||||
depends on BLUETOOTH_CONN || BLUETOOTH_CONTROLLER
|
||||
default 1
|
||||
range 1 64
|
||||
help
|
||||
Maximum number of simultaneous Bluetooth connections
|
||||
supported. The minimum (and default) number is 1.
|
||||
|
||||
config BLUETOOTH_DEBUG
|
||||
bool
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
ccflags-y +=-I$(srctree)/include/drivers
|
||||
|
||||
obj-$(CONFIG_BLUETOOTH_HCI_HOST) += uuid.o hci_core.o
|
||||
|
||||
obj-$(CONFIG_BLUETOOTH_HCI_RAW) += hci_raw.o
|
||||
|
||||
obj-$(CONFIG_BLUETOOTH_DEBUG) += log.o
|
||||
|
@ -12,17 +10,21 @@ obj-$(CONFIG_BLUETOOTH_TINYCRYPT_ECC) += hci_ecc.o
|
|||
|
||||
obj-$(CONFIG_BLUETOOTH_INTERNAL_STORAGE) += storage.o
|
||||
|
||||
ifeq ($(CONFIG_BLUETOOTH_CONN),y)
|
||||
obj-y += conn.o l2cap.o att.o gatt.o
|
||||
ifeq ($(CONFIG_BLUETOOTH_HCI_HOST),y)
|
||||
obj-y += uuid.o hci_core.o
|
||||
|
||||
ifeq ($(CONFIG_BLUETOOTH_SMP),y)
|
||||
obj-y += smp.o keys.o
|
||||
else
|
||||
obj-y += smp_null.o
|
||||
ifeq ($(CONFIG_BLUETOOTH_CONN),y)
|
||||
obj-y += conn.o l2cap.o att.o gatt.o
|
||||
|
||||
ifeq ($(CONFIG_BLUETOOTH_SMP),y)
|
||||
obj-y += smp.o keys.o
|
||||
else
|
||||
obj-y += smp_null.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_BLUETOOTH_HOST_CRYPTO) += crypto.o
|
||||
obj-$(CONFIG_BLUETOOTH_HOST_CRYPTO) += crypto.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_BLUETOOTH_BREDR) += keys_br.o l2cap_br.o sdp.o
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue