Add DEVICE_USBDEVICE detection in usbd implementation to avoid compiler error on target without usb-device

pull/12217/head
cyliangtw 2020-01-08 19:35:30 +08:00
parent b77f6b457e
commit b924a922a8
1 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,7 @@ static USBPhyHw *instance;
#define MBED_CONF_TARGET_USB_DEVICE_HSUSBD 1 /* USB 2.0 Only */
#endif
#if defined(DEVICE_USBDEVICE) && (DEVICE_USBDEVICE == 1)
extern "C" void USBD_IRQHandler(void);
@ -2374,3 +2375,5 @@ extern "C" void USBD_IRQHandler(void)
}
#endif
#endif