Skip to content

Commit de11398

Browse files
committed
samples: smp_svr: use new USB device stack
Use new USB device stack. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
1 parent 7a59c8a commit de11398

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

samples/subsys/mgmt/mcumgr/smp_svr/overlay-cdc.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Enable USB subsystem
2-
CONFIG_USB_DEVICE_STACK=y
32
CONFIG_SERIAL=y
43
CONFIG_UART_LINE_CTRL=y
5-
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
64
CONFIG_CONSOLE=y
5+
CONFIG_USB_DEVICE_STACK_NEXT=y
6+
CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT=y
77
# USB backend is serial device
88
CONFIG_MCUMGR_TRANSPORT_UART=y
99
CONFIG_BASE64=y

samples/subsys/mgmt/mcumgr/smp_svr/src/main.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,6 @@ int main(void)
7171
start_smp_bluetooth_adverts();
7272
#endif
7373

74-
if (IS_ENABLED(CONFIG_USB_DEVICE_STACK)) {
75-
rc = usb_enable(NULL);
76-
77-
/* Ignore EALREADY error as USB CDC is likely already initialised */
78-
if (rc != 0 && rc != -EALREADY) {
79-
LOG_ERR("Failed to enable USB");
80-
return 0;
81-
}
82-
}
8374
/* using __TIME__ ensure that a new binary will be built on every
8475
* compile which is convenient when testing firmware upgrade.
8576
*/

0 commit comments

Comments
 (0)