drivers: bluetooth: nble: restructures Bluetooth Kconfig options
This moves both the Bluetooth HCI and NBLE drivers under "Bluetooth Drivers" category. This also adds a selection for choosing Bluetooth stacks as the bulk of both HCI and NBLE stacks cannot be compiled together. Note that this does not move the source files. That should be done in a separate change. Change-Id: I32fa7097ada0fdc52bcc745adb78c7273f4023c6 Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
0b04465a8c
commit
fa868a7846
11 changed files with 59 additions and 10 deletions
|
@ -65,8 +65,6 @@ source "drivers/aio/Kconfig"
|
||||||
|
|
||||||
source "drivers/qmsi/Kconfig"
|
source "drivers/qmsi/Kconfig"
|
||||||
|
|
||||||
source "drivers/nble/Kconfig"
|
|
||||||
|
|
||||||
source "drivers/flash/Kconfig"
|
source "drivers/flash/Kconfig"
|
||||||
|
|
||||||
source "drivers/sensor/Kconfig"
|
source "drivers/sensor/Kconfig"
|
||||||
|
|
|
@ -19,8 +19,14 @@
|
||||||
#
|
#
|
||||||
# Bluetooth options
|
# Bluetooth options
|
||||||
#
|
#
|
||||||
menu "Bluetooth HCI Driver Options"
|
|
||||||
depends on BLUETOOTH
|
if BLUETOOTH
|
||||||
|
|
||||||
|
menu "Bluetooth Drivers"
|
||||||
|
|
||||||
|
if BLUETOOTH_STACK_HCI
|
||||||
|
|
||||||
|
comment "Bluetooth HCI Driver Options"
|
||||||
|
|
||||||
config BLUETOOTH_UART
|
config BLUETOOTH_UART
|
||||||
bool
|
bool
|
||||||
|
@ -28,11 +34,11 @@ config BLUETOOTH_UART
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Bluetooth HCI driver"
|
prompt "Bluetooth HCI driver"
|
||||||
depends on BLUETOOTH
|
|
||||||
default BLUETOOTH_H4
|
default BLUETOOTH_H4
|
||||||
|
|
||||||
config BLUETOOTH_H4
|
config BLUETOOTH_H4
|
||||||
bool "H:4 UART"
|
bool "H:4 UART"
|
||||||
|
select SERIAL
|
||||||
select UART_INTERRUPT_DRIVEN
|
select UART_INTERRUPT_DRIVEN
|
||||||
select BLUETOOTH_UART
|
select BLUETOOTH_UART
|
||||||
help
|
help
|
||||||
|
@ -41,6 +47,7 @@ config BLUETOOTH_H4
|
||||||
|
|
||||||
config BLUETOOTH_H5
|
config BLUETOOTH_H5
|
||||||
bool "H:5 UART [EXPERIMENTAL]"
|
bool "H:5 UART [EXPERIMENTAL]"
|
||||||
|
select SERIAL
|
||||||
select UART_INTERRUPT_DRIVEN
|
select UART_INTERRUPT_DRIVEN
|
||||||
select BLUETOOTH_UART
|
select BLUETOOTH_UART
|
||||||
help
|
help
|
||||||
|
@ -77,7 +84,6 @@ config BLUETOOTH_UART_ON_DEV_NAME
|
||||||
# Needed headroom for outgoing buffers (to controller)
|
# Needed headroom for outgoing buffers (to controller)
|
||||||
config BLUETOOTH_HCI_SEND_RESERVE
|
config BLUETOOTH_HCI_SEND_RESERVE
|
||||||
int
|
int
|
||||||
depends on BLUETOOTH
|
|
||||||
default 0 if BLUETOOTH_H4
|
default 0 if BLUETOOTH_H4
|
||||||
default 1 if BLUETOOTH_H5
|
default 1 if BLUETOOTH_H5
|
||||||
# Even if no driver is selected the following default is still
|
# Even if no driver is selected the following default is still
|
||||||
|
@ -87,11 +93,16 @@ config BLUETOOTH_HCI_SEND_RESERVE
|
||||||
# Needed headroom for incoming buffers (from controller)
|
# Needed headroom for incoming buffers (from controller)
|
||||||
config BLUETOOTH_HCI_RECV_RESERVE
|
config BLUETOOTH_HCI_RECV_RESERVE
|
||||||
int
|
int
|
||||||
depends on BLUETOOTH
|
|
||||||
default 0 if BLUETOOTH_H4
|
default 0 if BLUETOOTH_H4
|
||||||
default 0 if BLUETOOTH_H5
|
default 0 if BLUETOOTH_H5
|
||||||
# Even if no driver is selected the following default is still
|
# Even if no driver is selected the following default is still
|
||||||
# needed e.g. for unit tests.
|
# needed e.g. for unit tests.
|
||||||
default 0
|
default 0
|
||||||
|
|
||||||
|
endif # BLUETOOTH_STACK_HCI
|
||||||
|
|
||||||
|
source "drivers/nble/Kconfig"
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
endif # BLUETOOTH
|
||||||
|
|
|
@ -18,14 +18,17 @@
|
||||||
|
|
||||||
config NBLE
|
config NBLE
|
||||||
bool "Support for custom Nordic Semiconductor BLE protocol"
|
bool "Support for custom Nordic Semiconductor BLE protocol"
|
||||||
|
default y if BLUETOOTH_STACK_NBLE
|
||||||
default n
|
default n
|
||||||
select BLUETOOTH_PERIPHERAL
|
select BLUETOOTH_PERIPHERAL
|
||||||
select BLUETOOTH_CENTRAL
|
select BLUETOOTH_CENTRAL
|
||||||
select BLUETOOTH_GATT_CLIENT
|
select BLUETOOTH_GATT_CLIENT
|
||||||
select BLUETOOTH_SMP
|
select BLUETOOTH_SMP
|
||||||
|
select SERIAL
|
||||||
select UART_INTERRUPT_DRIVEN
|
select UART_INTERRUPT_DRIVEN
|
||||||
select NANO_TIMEOUTS
|
select NANO_TIMEOUTS
|
||||||
select NET_BUF
|
select NET_BUF
|
||||||
|
depends on BLUETOOTH_STACK_NBLE
|
||||||
help
|
help
|
||||||
Enables support for using Nordic Semiconductor nRF51 Bluetooth
|
Enables support for using Nordic Semiconductor nRF51 Bluetooth
|
||||||
LE chips with a custom firmware. The API for this is a subset of
|
LE chips with a custom firmware. The API for this is a subset of
|
||||||
|
@ -37,7 +40,7 @@ config NBLE
|
||||||
& endianess) as the nRF51 chip. The driver cannot be used on
|
& endianess) as the nRF51 chip. The driver cannot be used on
|
||||||
any architecture that doesn't fulfill this requirement.
|
any architecture that doesn't fulfill this requirement.
|
||||||
|
|
||||||
if !BLUETOOTH && NBLE
|
if NBLE
|
||||||
config BLUETOOTH_PERIPHERAL
|
config BLUETOOTH_PERIPHERAL
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -21,11 +21,34 @@ menuconfig BLUETOOTH
|
||||||
default n
|
default n
|
||||||
select NANO_TIMEOUTS
|
select NANO_TIMEOUTS
|
||||||
select NET_BUF
|
select NET_BUF
|
||||||
select BLUETOOTH_LE
|
select BLUETOOTH_LE if !BLUETOOTH_STACK_NBLE
|
||||||
help
|
help
|
||||||
This option enables Bluetooth support.
|
This option enables Bluetooth support.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Bluetooth Stack Selection"
|
||||||
|
depends on BLUETOOTH
|
||||||
|
default BLUETOOTH_STACK_HCI
|
||||||
|
help
|
||||||
|
Select the Bluetooth stack to compile.
|
||||||
|
|
||||||
|
config BLUETOOTH_STACK_HCI
|
||||||
|
bool "HCI Stack"
|
||||||
|
help
|
||||||
|
Select the Bluetooth stack to use with HCI drivers.
|
||||||
|
|
||||||
|
config BLUETOOTH_STACK_NBLE
|
||||||
|
bool "Nordic BLE Stack"
|
||||||
|
help
|
||||||
|
Select the Bluetooth stack to use with Nordic BLE drivers.
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
if BLUETOOTH
|
if BLUETOOTH
|
||||||
|
|
||||||
|
comment "HCI Stack Configurations"
|
||||||
|
depends on BLUETOOTH_STACK_HCI
|
||||||
|
|
||||||
config BLUETOOTH_LE
|
config BLUETOOTH_LE
|
||||||
bool "Bluetooth Low Energy (LE) support"
|
bool "Bluetooth Low Energy (LE) support"
|
||||||
default n
|
default n
|
||||||
|
@ -35,6 +58,7 @@ config BLUETOOTH_LE
|
||||||
select TINYCRYPT_SHA256
|
select TINYCRYPT_SHA256
|
||||||
select TINYCRYPT_SHA256_HMAC
|
select TINYCRYPT_SHA256_HMAC
|
||||||
select TINYCRYPT_SHA256_HMAC_PRNG
|
select TINYCRYPT_SHA256_HMAC_PRNG
|
||||||
|
depends on BLUETOOTH_STACK_HCI
|
||||||
help
|
help
|
||||||
This option enables Bluetooth Low Energy (LE) support.
|
This option enables Bluetooth Low Energy (LE) support.
|
||||||
Currently it is mandatory whenever Bluetooth support
|
Currently it is mandatory whenever Bluetooth support
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
obj-y = hci_core.o \
|
obj-$(CONFIG_BLUETOOTH_STACK_HCI) = \
|
||||||
|
hci_core.o \
|
||||||
uuid.o
|
uuid.o
|
||||||
|
|
||||||
ifeq ($(CONFIG_BLUETOOTH_CONN),y)
|
ifeq ($(CONFIG_BLUETOOTH_CONN),y)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
CONFIG_BLUETOOTH=y
|
||||||
|
CONFIG_BLUETOOTH_STACK_NBLE=y
|
||||||
CONFIG_NBLE=y
|
CONFIG_NBLE=y
|
||||||
CONFIG_ARC_INIT=n
|
CONFIG_ARC_INIT=n
|
||||||
CONFIG_BLUETOOTH_DEBUG=y
|
CONFIG_BLUETOOTH_DEBUG=y
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
CONFIG_BLUETOOTH=y
|
||||||
|
CONFIG_BLUETOOTH_STACK_NBLE=y
|
||||||
CONFIG_NBLE=y
|
CONFIG_NBLE=y
|
||||||
CONFIG_ARC_INIT=n
|
CONFIG_ARC_INIT=n
|
||||||
CONFIG_BLUETOOTH_DEBUG=y
|
CONFIG_BLUETOOTH_DEBUG=y
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
CONFIG_BLUETOOTH=y
|
||||||
|
CONFIG_BLUETOOTH_STACK_NBLE=y
|
||||||
CONFIG_NBLE=y
|
CONFIG_NBLE=y
|
||||||
CONFIG_ARC_INIT=n
|
CONFIG_ARC_INIT=n
|
||||||
CONFIG_BLUETOOTH_DEBUG=y
|
CONFIG_BLUETOOTH_DEBUG=y
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
CONFIG_BLUETOOTH=y
|
||||||
|
CONFIG_BLUETOOTH_STACK_NBLE=y
|
||||||
CONFIG_NBLE=y
|
CONFIG_NBLE=y
|
||||||
CONFIG_ARC_INIT=n
|
CONFIG_ARC_INIT=n
|
||||||
CONFIG_BLUETOOTH_DEBUG=y
|
CONFIG_BLUETOOTH_DEBUG=y
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
CONFIG_MINIMAL_LIBC_EXTENDED=y
|
CONFIG_MINIMAL_LIBC_EXTENDED=y
|
||||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||||
|
CONFIG_BLUETOOTH=y
|
||||||
|
CONFIG_BLUETOOTH_STACK_NBLE=y
|
||||||
CONFIG_NBLE=y
|
CONFIG_NBLE=y
|
||||||
CONFIG_ARC_INIT=n
|
CONFIG_ARC_INIT=n
|
||||||
CONFIG_CONSOLE_HANDLER=y
|
CONFIG_CONSOLE_HANDLER=y
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
CONFIG_UART_PIPE=y
|
CONFIG_UART_PIPE=y
|
||||||
CONFIG_CONSOLE_HANDLER=y
|
CONFIG_CONSOLE_HANDLER=y
|
||||||
|
CONFIG_BLUETOOTH=y
|
||||||
|
CONFIG_BLUETOOTH_STACK_NBLE=y
|
||||||
CONFIG_NBLE=y
|
CONFIG_NBLE=y
|
||||||
CONFIG_ARC_INIT=n
|
CONFIG_ARC_INIT=n
|
||||||
CONFIG_UART_CONSOLE=n
|
CONFIG_UART_CONSOLE=n
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue