Skip to content

Commit 80b6fac

Browse files
committed
Adapt samd port to ArduinoCore-API
1 parent 285366b commit 80b6fac

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/MIDIUSB.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@
5656

5757
#elif defined(ARDUINO_ARCH_SAMD)
5858

59+
#if defined(ARDUINO_API_VERSION)
60+
#include "api/PluggableUSB.h"
61+
#define EPTYPE_DESCRIPTOR_SIZE unsigned int
62+
#else
5963
#include "USB/PluggableUSB.h"
60-
6164
#define EPTYPE_DESCRIPTOR_SIZE uint32_t
65+
#endif
6266
#define EP_TYPE_BULK_IN_MIDI USB_ENDPOINT_TYPE_BULK | USB_ENDPOINT_IN(0);
6367
#define EP_TYPE_BULK_OUT_MIDI USB_ENDPOINT_TYPE_BULK | USB_ENDPOINT_OUT(0);
6468
#define MIDI_BUFFER_SIZE EPX_SIZE

0 commit comments

Comments
 (0)