From b6d2209e9aa9a66ae7678ecdffdf3a64c5221286 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 7 Mar 2023 00:08:17 +0100 Subject: [PATCH] sys/auto_init: add support for USB MSC --- sys/auto_init/usb/auto_init_usb.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/auto_init/usb/auto_init_usb.c b/sys/auto_init/usb/auto_init_usb.c index 21ae458d73..ca192c6c21 100644 --- a/sys/auto_init/usb/auto_init_usb.c +++ b/sys/auto_init/usb/auto_init_usb.c @@ -39,6 +39,10 @@ usbus_cdcecm_device_t cdcecm; #include "usb/usbus/dfu.h" static usbus_dfu_device_t dfu; #endif +#ifdef MODULE_USBUS_MSC +#include "usb/usbus/msc.h" +static usbus_msc_device_t msc; +#endif static char _stack[USBUS_STACKSIZE]; static usbus_t usbus; @@ -66,6 +70,11 @@ void auto_init_usb(void) usbus_dfu_init(&usbus, &dfu, USB_DFU_PROTOCOL_RUNTIME_MODE); #endif +#ifdef MODULE_USBUS_MSC + /* Initialize Mass Storage Class */ + usbus_msc_init(&usbus, &msc); +#endif + /* Finally initialize USBUS thread */ usbus_create(_stack, USBUS_STACKSIZE, USBUS_PRIO, USBUS_TNAME, &usbus); }