1# Kconfig - Bluetooth configuration options 2# 3# Copyright (c) 2016 Intel Corporation 4# 5# SPDX-License-Identifier: Apache-2.0 6# 7 8menu "Bluetooth" 9 10config BT 11 bool "Bluetooth support" 12 select NET_BUF 13 help 14 This option enables Bluetooth support. 15 16if BT 17 18choice 19 prompt "Bluetooth Stack Selection" 20 default BT_HCI 21 help 22 Select the Bluetooth stack to compile. 23 24config BT_HCI 25 bool "HCI-based" 26 help 27 HCI-based stack with optional host & controller parts and an 28 HCI driver in between. 29 30config BT_CUSTOM 31 bool "Custom" 32 help 33 Select a custom, non-HCI based stack. If you're not sure what 34 this is, you probably want the HCI-based stack instead. 35 36endchoice 37 38# The Bluetooth subsystem requires the system workqueue to execute at 39# a cooperative priority. 40config SYSTEM_WORKQUEUE_PRIORITY 41 int 42 range -256 -1 43 44if BT_HCI 45 46choice BT_HCI_BUS_TYPE 47 prompt "Bluetooth HCI driver" 48 default BT_H4 49 50config BT_H4 51 bool "H:4 UART" 52 select BT_RECV_IS_RX_THREAD 53 help 54 Bluetooth H:4 UART driver. Requires hardware flow control 55 lines to be available. 56 57config BT_H5 58 bool "H:5 UART [EXPERIMENTAL]" 59 help 60 Bluetooth three-wire (H:5) UART driver. Implementation of HCI 61 Three-Wire UART Transport Layer. 62 63config BT_SPI 64 bool "SPI HCI" 65 select BT_RECV_IS_RX_THREAD 66 depends on SPI 67 help 68 Supports Bluetooth ICs using SPI as the communication protocol. 69 HCI packets are sent and received as single Byte transfers, 70 prepended after a known header. Headers may vary per device, so 71 additional platform specific knowledge may need to be added as 72 devices are. 73 74config BT_USERCHAN 75 bool "HCI User Channel based driver" 76 help 77 This driver provides access to the local Linux host's Bluetooth 78 adapter using a User Channel HCI socket to the Linux kernel. It 79 is only intended to be used with the native POSIX build of Zephyr. 80 The Bluetooth adapter must be powered off in order for Zephyr to 81 be able to use it. 82 83config BT_NO_DRIVER 84 bool "No default HCI driver" 85 help 86 This is intended for unit tests where no internal driver 87 should be selected. 88 89endchoice 90 91config BT_HCI_RAW 92 bool "RAW HCI access" 93 help 94 This option allows to access Bluetooth controller 95 from the application with the RAW HCI protocol. 96 97config BT_PERIPHERAL 98 bool "Peripheral Role support" 99 select BT_BROADCASTER 100 select BT_CONN 101 default y if BT_HCI_RAW 102 help 103 Select this for LE Peripheral role support. 104 105config BT_CENTRAL 106 bool "Central Role support" 107 select BT_OBSERVER 108 select BT_CONN 109 default y if BT_HCI_RAW 110 help 111 Select this for LE Central role support. 112 113menu "Broadcaster" 114 visible if !BT_PERIPHERAL 115 116config BT_BROADCASTER 117 bool "Broadcaster Role support" 118 default y if !BT_OBSERVER 119 help 120 Select this for LE Broadcaster role support. 121 122endmenu 123 124menu "Observer" 125 visible if !BT_CENTRAL 126 127config BT_OBSERVER 128 bool "Observer Role support" 129 help 130 Select this for LE Observer role support. 131 132endmenu 133 134config BT_CONN 135 # Virtual/hidden option 136 bool 137 138config BT_MAX_CONN 139 int "Maximum number of simultaneous connections" 140 depends on BT_CONN 141 range 1 64 142 default 1 143 help 144 Maximum number of simultaneous Bluetooth connections 145 supported. 146 147if BT_CONN 148config BT_HCI_ACL_FLOW_CONTROL 149 bool "Controller to Host ACL flow control support" 150 # Enable if building a Host-only build 151 default y if !BT_CTLR 152 # Enable if building a Controller-only build 153 default y if BT_HCI_RAW 154 select POLL 155 help 156 Enable support for throttling ACL buffers from the controller 157 to the host. This is particularly useful when the host and 158 controller are on separate cores since it ensures that we do 159 not run out of incoming ACL buffers. 160endif # BT_CONN 161 162config BT_CTLR_TO_HOST_UART_DEV_NAME 163 string "Device Name of UART Device to an external Bluetooth Host" 164 default "UART_0" 165 depends on BT_HCI_RAW 166 help 167 This option specifies the name of UART device to be used 168 to connect to an external Bluetooth Host when Zephyr is 169 acting as a Bluetooth Controller. 170 171# TODO add DTS support, once SPI node definitions are available. 172 173config BT_CTLR_TO_HOST_SPI_DEV_NAME 174 string "Device Name of SPI Device to an external Bluetooth Host" 175 default "SPI_0" 176 depends on SPI && BT_HCI_RAW 177 help 178 This option specifies the name of SPI device to be used to connect 179 to an external Bluetooth Host when Zephyr is acting as a Bluetooth 180 Controller. 181 182config BT_CTLR_TO_HOST_SPI_IRQ_DEV_NAME 183 string "Device Name of SPI IRQ to an external Bluetooth Host" 184 default "GPIO_0" 185 depends on SPI && BT_HCI_RAW 186 help 187 This option specifies the name of SPI IRQ device to be used to 188 notify an external Bluetooth Host when Zephyr is acting as a 189 Bluetooth Controller. 190 191config BT_CTLR_TO_HOST_SPI_IRQ_PIN 192 int "SPI IRQ line number to an external Bluetooth Host" 193 default 0 194 depends on SPI && BT_HCI_RAW 195 help 196 This option specifies the IRQ line number to be used to notify 197 an external Bluetooth Host when Zephyr is acting as a Bluetooth 198 Controller. 199 200source "bt_host/host/Kconfig" 201source "bt_host/port/core/Kconfig" 202source "bt_host/port/core/settings/Kconfig" 203 204source "bt_mesh/Kconfig" 205source "bt_shell/bt_host/Kconfig" 206endif # BT_HCI 207 208endif # BT 209 210endmenu 211