1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 09:52:43 +01:00

sys/auto_init: add support for USB MSC

This commit is contained in:
Benjamin Valentin 2023-03-07 00:08:17 +01:00
parent 777857ae4c
commit b6d2209e9a

View File

@ -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);
}