USB: Do not compile USB on devices that does not have it
This commit is contained in:
parent
b6c8b8bc18
commit
623e0c5f4a
|
@ -47,7 +47,9 @@ int main(void)
|
|||
|
||||
initVariant();
|
||||
|
||||
#if defined(USB_BASE) || defined(USB_OTG_DEVICE_BASE)
|
||||
USBDeviceFS.beginMenuSelection();
|
||||
#endif
|
||||
|
||||
setup();
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "Arduino.h"
|
||||
|
||||
#if defined(USB_BASE) || defined(USB_OTG_DEVICE_BASE)
|
||||
|
||||
#include "USBDevice.h"
|
||||
#include "usbd_core.h"
|
||||
#include "usbd_desc.h"
|
||||
|
@ -123,3 +125,5 @@ extern "C" void USBSerial_Rx_Handler(uint8_t *data, uint16_t len){
|
|||
USBD_HandleTypeDef hUsbDeviceFS;
|
||||
|
||||
USBDeviceClass USBDeviceFS;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue