Skip to content

Commit e2b0135

Browse files
jfischer-nocfriedt
authored andcommitted
samples: hci_uart: use new USB device stack
The change only affects board nrf52840dongle_nrf52840. Signed-off-by: Johann Fischer <[email protected]>
1 parent 3f39e1c commit e2b0135

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
CONFIG_USB_DEVICE_STACK=y
2-
CONFIG_USB_DEVICE_PRODUCT="Zephyr HCI UART sample"
3-
CONFIG_USB_CDC_ACM=y
4-
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
1+
# The board uses the CDC ACM UART as the serial backend by default, nothing
2+
# else needs to be configured here.
3+
CONFIG_CDC_ACM_SERIAL_PRODUCT_STRING="Zephyr HCI UART sample"

samples/bluetooth/hci_uart/src/main.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#include <zephyr/init.h>
2121
#include <zephyr/drivers/uart.h>
2222

23-
#include <zephyr/usb/usb_device.h>
24-
2523
#include <zephyr/net_buf.h>
2624
#include <zephyr/bluetooth/bluetooth.h>
2725
#include <zephyr/bluetooth/l2cap.h>
@@ -331,13 +329,6 @@ static int hci_uart_init(void)
331329
{
332330
LOG_DBG("");
333331

334-
if (IS_ENABLED(CONFIG_USB_CDC_ACM)) {
335-
if (usb_enable(NULL)) {
336-
LOG_ERR("Failed to enable USB");
337-
return -EINVAL;
338-
}
339-
}
340-
341332
if (!device_is_ready(hci_uart_dev)) {
342333
LOG_ERR("HCI UART %s is not ready", hci_uart_dev->name);
343334
return -EINVAL;

0 commit comments

Comments
 (0)