Skip to content

Commit b924a92

Browse files
committed
Add DEVICE_USBDEVICE detection in usbd implementation to avoid compiler error on target without usb-device
1 parent b77f6b4 commit b924a92

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

targets/TARGET_NUVOTON/USBEndpoints_Nuvoton.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ static USBPhyHw *instance;
3737
#define MBED_CONF_TARGET_USB_DEVICE_HSUSBD 1 /* USB 2.0 Only */
3838
#endif
3939

40+
#if defined(DEVICE_USBDEVICE) && (DEVICE_USBDEVICE == 1)
4041

4142
extern "C" void USBD_IRQHandler(void);
4243

@@ -2374,3 +2375,5 @@ extern "C" void USBD_IRQHandler(void)
23742375
}
23752376

23762377
#endif
2378+
2379+
#endif

0 commit comments

Comments
 (0)