From 80b6fac501702a268d7f9ab9702333c5d059e059 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Tue, 22 Dec 2020 12:28:38 +0100 Subject: [PATCH] Adapt samd port to ArduinoCore-API --- src/MIDIUSB.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MIDIUSB.h b/src/MIDIUSB.h index 487eaea..e917224 100644 --- a/src/MIDIUSB.h +++ b/src/MIDIUSB.h @@ -56,9 +56,13 @@ #elif defined(ARDUINO_ARCH_SAMD) +#if defined(ARDUINO_API_VERSION) +#include "api/PluggableUSB.h" +#define EPTYPE_DESCRIPTOR_SIZE unsigned int +#else #include "USB/PluggableUSB.h" - #define EPTYPE_DESCRIPTOR_SIZE uint32_t +#endif #define EP_TYPE_BULK_IN_MIDI USB_ENDPOINT_TYPE_BULK | USB_ENDPOINT_IN(0); #define EP_TYPE_BULK_OUT_MIDI USB_ENDPOINT_TYPE_BULK | USB_ENDPOINT_OUT(0); #define MIDI_BUFFER_SIZE EPX_SIZE