Skip to content

Commit 6ea8774

Browse files
committed
usb: fix compilation for santiago
1 parent 649aa84 commit 6ea8774

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cores/arduino/usb/USB.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,15 @@ void __SetupUSBDescriptor() {
149149
* ----- MASS STORAGE DEVICE
150150
*/
151151

152+
#if CFG_TUD_MSC
152153
uint8_t msd_itf = (__USBInstallSerial ? 3 : 0) + (__USBGetHIDReport ? 1 : 0);
153154
uint8_t msd_desc[TUD_MSC_DESC_LEN] = {
154155
// Interface number, string index, EP Out & EP In address, EP size
155156
TUD_MSC_DESCRIPTOR(msd_itf, 0, USBD_MSD_EP_OUT, USBD_MSD_EP_IN, USBD_MSD_IN_OUT_SIZE)
156157
};
157-
158+
#else
159+
uint8_t msd_desc[0] = {};
160+
#endif
158161

159162

160163
int usbd_desc_len = TUD_CONFIG_DESC_LEN + (__USBInstallSerial ? sizeof(cdc_desc) : 0) + (__USBGetHIDReport ? sizeof(hid_desc) : 0) + (__USBInstallMSD ? sizeof(msd_desc) : 0);

0 commit comments

Comments
 (0)