Skip to content

Commit 72be0ed

Browse files
jfischer-nocfriedt
authored andcommitted
tests: bluetooth: shell: update shell over CDC ACM UART configuration
Add usb.overlay which contains chosen node and cdc-acm-uart node. Update USB configuration and test case. Signed-off-by: Johann Fischer <[email protected]>
1 parent 1de84d2 commit 72be0ed

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

tests/bluetooth/shell/cdc_acm.conf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ CONFIG_USB_DEVICE_STACK=y
22
CONFIG_USB_DEVICE_PRODUCT="Zephyr BT Shell"
33
CONFIG_USB_UART_CONSOLE=y
44

5-
CONFIG_UART_INTERRUPT_DRIVEN=y
65
CONFIG_UART_LINE_CTRL=y
7-
CONFIG_UART_SHELL_ON_DEV_NAME="CDC_ACM_0"
6+
CONFIG_SHELL_BACKEND_SERIAL_INIT_PRIORITY=51

tests/bluetooth/shell/testcase.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ tests:
99
min_flash: 145
1010
bluetooth.shell.cdc_acm:
1111
extra_args: OVERLAY_CONFIG=cdc_acm.conf
12+
DTC_OVERLAY_FILE="usb.overlay"
1213
depends_on: usb_device
13-
platform_allow: qemu_cortex_m3 qemu_x86 native_posix native_posix_64 nrf52840dk_nrf52840
14+
platform_allow: native_posix native_posix_64 nrf52840dk_nrf52840
1415
platform_exclude: nrf52dk_nrf52810
1516
tags: bluetooth
1617
harness: keyboard

tests/bluetooth/shell/usb.overlay

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: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,shell-uart = &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+
};

0 commit comments

Comments
 (0)