Skip to content

Commit 1d52620

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 4d53a79 commit 1d52620

File tree

4 files changed

+1
-40
lines changed

4 files changed

+1
-40
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
@@ -14,8 +14,7 @@ tests:
1414
tags: shell usb
1515
harness: keyboard
1616
min_ram: 40
17-
extra_args: OVERLAY_CONFIG="overlay-usb.conf"
18-
DTC_OVERLAY_FILE="usb.overlay"
17+
extra_args: SHIELD="cdc_acm_shell"
1918
sample.shell.shell_module.minimal:
2019
filter: CONFIG_SERIAL and dt_chosen_enabled("zephyr,shell-uart")
2120
tags: shell

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -344,19 +344,4 @@ void main(void)
344344
if (IS_ENABLED(CONFIG_SHELL_START_OBSCURED)) {
345345
login_init();
346346
}
347-
348-
#if DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_shell_uart), zephyr_cdc_acm_uart)
349-
const struct device *dev;
350-
uint32_t dtr = 0;
351-
352-
dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart));
353-
if (!device_is_ready(dev) || usb_enable(NULL)) {
354-
return;
355-
}
356-
357-
while (!dtr) {
358-
uart_line_ctrl_get(dev, UART_LINE_CTRL_DTR, &dtr);
359-
k_sleep(K_MSEC(100));
360-
}
361-
#endif
362347
}

samples/subsys/shell/shell_module/usb.overlay

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

0 commit comments

Comments
 (0)