Skip to content

Commit bf162a3

Browse files
committed
samples: bluetooth: Align with USB changes
Align Bluetooth samples with USB changes. Signed-off-by: Robert Lubos <[email protected]>
1 parent 5402b43 commit bf162a3

23 files changed

+137
-19
lines changed

samples/bluetooth/llpm/boards/nrf52840dongle_nrf52840.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ CONFIG_USB_UART_CONSOLE=y
44

55
CONFIG_UART_INTERRUPT_DRIVEN=y
66
CONFIG_UART_LINE_CTRL=y
7-
CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0"
87

98
# Since the default LOG_MODE_MINIMAL is synchronous, it will mess with the USB
109
# driver/subsys. Use the deferred mode instead.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2021 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,console = &cdc_acm_uart0;
10+
};
11+
};
12+
13+
&zephyr_udc0 {
14+
cdc_acm_uart0: cdc_acm_uart0 {
15+
compatible = "zephyr,cdc-acm-uart";
16+
label = "CDC_ACM_0";
17+
};
18+
};

samples/bluetooth/llpm/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#
66
CONFIG_NCS_SAMPLES_DEFAULTS=y
77

8+
CONFIG_CONSOLE=y
89
CONFIG_CONSOLE_SUBSYS=y
910
CONFIG_CONSOLE_HANDLER=y
1011
CONFIG_CONSOLE_GETCHAR=y

samples/bluetooth/llpm/src/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,7 @@ void main(void)
421421
};
422422

423423
#if defined(CONFIG_USB_DEVICE_STACK)
424-
const struct device *uart_dev = device_get_binding(
425-
CONFIG_UART_CONSOLE_ON_DEV_NAME);
424+
const struct device *uart_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console));
426425
uint32_t dtr = 0;
427426

428427
if (usb_enable(NULL)) {

samples/bluetooth/mesh/light/boards/thingy53_nrf5340_cpuapp.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,3 @@ CONFIG_USB_UART_CONSOLE=y
8989
CONFIG_LOG_BACKEND_UART=y
9090
CONFIG_USE_SEGGER_RTT=n
9191
CONFIG_LOG_BACKEND_RTT=n
92-
CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0"

samples/bluetooth/mesh/light/boards/thingy53_nrf5340_cpuapp.overlay

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,15 @@
6060
};
6161
};
6262
};
63+
64+
chosen {
65+
zephyr,console = &cdc_acm_uart0;
66+
};
67+
};
68+
69+
&zephyr_udc0 {
70+
cdc_acm_uart0: cdc_acm_uart0 {
71+
compatible = "zephyr,cdc-acm-uart";
72+
label = "CDC_ACM_0";
73+
};
6374
};

samples/bluetooth/mesh/light/boards/thingy53_nrf5340_cpuapp_ns.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,3 @@ CONFIG_USB_UART_CONSOLE=y
8989
CONFIG_LOG_BACKEND_UART=y
9090
CONFIG_USE_SEGGER_RTT=n
9191
CONFIG_LOG_BACKEND_RTT=n
92-
CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0"

samples/bluetooth/mesh/light/boards/thingy53_nrf5340_cpuapp_ns.overlay

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,15 @@
6060
};
6161
};
6262
};
63+
64+
chosen {
65+
zephyr,console = &cdc_acm_uart0;
66+
};
67+
};
68+
69+
&zephyr_udc0 {
70+
cdc_acm_uart0: cdc_acm_uart0 {
71+
compatible = "zephyr,cdc-acm-uart";
72+
label = "CDC_ACM_0";
73+
};
6374
};

samples/bluetooth/mesh/light_switch/boards/thingy53_nrf5340_cpuapp.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,3 @@ CONFIG_USB_UART_CONSOLE=y
9090
CONFIG_LOG_BACKEND_UART=y
9191
CONFIG_USE_SEGGER_RTT=n
9292
CONFIG_LOG_BACKEND_RTT=n
93-
CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0"

samples/bluetooth/mesh/light_switch/boards/thingy53_nrf5340_cpuapp.overlay

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,15 @@
6060
};
6161
};
6262
};
63+
64+
chosen {
65+
zephyr,console = &cdc_acm_uart0;
66+
};
67+
};
68+
69+
&zephyr_udc0 {
70+
cdc_acm_uart0: cdc_acm_uart0 {
71+
compatible = "zephyr,cdc-acm-uart";
72+
label = "CDC_ACM_0";
73+
};
6374
};

0 commit comments

Comments
 (0)