Skip to content

Commit cf73656

Browse files
committed
samples: shell_module: use generic CDC ACM shield
Remove CDC ACM UART devicetree and config overlay, and explicit USB support initialization in favor of generic CDC ACM shield. For shell support via USB CDC ACM, this example is to be built as follows: west build -b nrf52840dongle_nrf52840 samples/subsys/shell/shell_module -- -DSHIELD=cdc_acm_shell Signed-off-by: Johann Fischer <[email protected]>
1 parent 88c02cd commit cf73656

File tree

4 files changed

+1
-39
lines changed

4 files changed

+1
-39
lines changed

samples/subsys/shell/shell_module/overlay-usb.conf

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/subsys/shell/shell_module/sample.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ tests:
1313
tags: shell usb
1414
harness: keyboard
1515
min_ram: 40
16-
extra_args: OVERLAY_CONFIG="overlay-usb.conf"
17-
DTC_OVERLAY_FILE="usb.overlay"
16+
extra_args: SHIELD="cdc_acm_shell"
1817
integration_platforms:
1918
- native_posix
2019
sample.shell.shell_module.minimal:

samples/subsys/shell/shell_module/src/main.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -425,19 +425,4 @@ void main(void)
425425
if (IS_ENABLED(CONFIG_SHELL_START_OBSCURED)) {
426426
login_init();
427427
}
428-
429-
#if DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_shell_uart), zephyr_cdc_acm_uart)
430-
const struct device *dev;
431-
uint32_t dtr = 0;
432-
433-
dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart));
434-
if (!device_is_ready(dev) || usb_enable(NULL)) {
435-
return;
436-
}
437-
438-
while (!dtr) {
439-
uart_line_ctrl_get(dev, UART_LINE_CTRL_DTR, &dtr);
440-
k_sleep(K_MSEC(100));
441-
}
442-
#endif
443428
}

samples/subsys/shell/shell_module/usb.overlay

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)