File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed
samples/boards/sensortile_box Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2021 Nordic Semiconductor ASA
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
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+ };
Original file line number Diff line number Diff line change @@ -32,5 +32,4 @@ CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC SensorTile.box"
3232CONFIG_USB_UART_CONSOLE=y
3333CONFIG_UART_INTERRUPT_DRIVEN=y
3434CONFIG_UART_LINE_CTRL=y
35- CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0"
3635CONFIG_CBPRINTF_FP_SUPPORT=y
Original file line number Diff line number Diff line change @@ -250,14 +250,13 @@ static void iis3dhhc_config(const struct device *iis3dhhc)
250250void main (void )
251251{
252252 static const struct device * led0 , * led1 ;
253- const struct device * dev = device_get_binding (
254- CONFIG_UART_CONSOLE_ON_DEV_NAME );
253+ const struct device * dev = DEVICE_DT_GET (DT_CHOSEN (zephyr_console ));
255254 int i , on = 1 ;
256255 int cnt = 1 ;
257256 uint32_t dtr = 0 ;
258257
259258 /* Application must enable USB by itself */
260- if (usb_enable (NULL )) {
259+ if (! device_is_ready ( dev ) || usb_enable (NULL )) {
261260 return ;
262261 }
263262
You can’t perform that action at this time.
0 commit comments