Skip to content

Commit 5c077d7

Browse files
jfischer-nostephanosio
authored andcommitted
usb: device_next: add BT HCI USB transport layer
Add Bluetooth HCI USB transport layer implementation for the new experimental USB device support based on the existing implementation subsys/usb/device/class/bluetooth.c. This implementation, unlike existing one, contains the interface descriptors for isochronous endpoints. Since we do not support voice channels, these are just there to avoid issues with Linux kernel btusb driver when this implementation is part of a composite configuration. Signed-off-by: Johann Fischer <[email protected]>
1 parent e60a4ef commit 5c077d7

File tree

4 files changed

+661
-0
lines changed

4 files changed

+661
-0
lines changed

subsys/usb/device_next/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,9 @@ zephyr_library_sources_ifdef(
3131
class/usbd_cdc_acm.c
3232
)
3333

34+
zephyr_library_sources_ifdef(
35+
CONFIG_USBD_BT_HCI
36+
class/bt_hci.c
37+
)
38+
3439
zephyr_linker_sources(DATA_SECTIONS usbd_data.ld)

subsys/usb/device_next/class/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44

55
rsource "Kconfig.loopback"
66
rsource "Kconfig.cdc_acm"
7+
rsource "Kconfig.bt"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (c) 2023 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config USBD_BT_HCI
5+
bool "Bluetooth HCI USB Transport Layer"
6+
select BT
7+
select BT_HCI_RAW
8+
help
9+
Bluetooth HCI USB Transport Layer
10+
11+
if USBD_BT_HCI
12+
13+
config USBD_BT_HCI_TX_THREAD_PRIORITY
14+
int "TX thread priority"
15+
default 8
16+
help
17+
Bluetooth HCI USB Transport Layer TX thread priority.
18+
19+
config USBD_BT_HCI_TX_STACK_SIZE
20+
int "TX thread stack size"
21+
default 512
22+
help
23+
Bluetooth HCI USB Transport Layer TX thread stack size.
24+
25+
config USBD_BT_HCI_RX_THREAD_PRIORITY
26+
int "RX thread priority"
27+
default 8
28+
help
29+
Bluetooth HCI USB Transport Layer RX thread priority.
30+
31+
module = USBD_BT_HCI
32+
module-str = usbd bt hci
33+
source "subsys/logging/Kconfig.template.log_config"
34+
35+
endif

0 commit comments

Comments
 (0)