File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 26
26
#else
27
27
28
28
#include " USB/PluggableUSB.h"
29
+ #define EPTYPE_DESCRIPTOR_SIZE uint32_t
30
+
31
+ #if defined(ARDUINO_ARCH_SAM)
29
32
#define USB_SendControl USBD_SendControl
30
33
#define USB_Available USBD_Available
31
34
#define USB_Recv USBD_Recv
32
35
#define USB_Send USBD_Send
33
36
#define USB_Flush USBD_Flush
34
- #define EPTYPE_DESCRIPTOR_SIZE uint32_t
37
+ #endif
38
+
39
+ #if defined(__SAMD21G18A__)
40
+ #define USB_SendControl USBDevice.sendControl
41
+ #define USB_Available USBDevice.available
42
+ #define USB_Recv USBDevice.recv
43
+ #define USB_Send USBDevice.send
44
+ #define USB_Flush USBDevice.flush
45
+ #endif
35
46
36
47
#endif
37
48
Original file line number Diff line number Diff line change @@ -18,13 +18,12 @@ typedef struct
18
18
uint8_t byte3;
19
19
}midiEventPacket_t;
20
20
21
- #if !defined(ARDUINO_ARCH_SAM)
22
-
21
+ #if defined(ARDUINO_ARCH_AVR)
23
22
#define EP_TYPE_BULK_OUT_MIDI EP_TYPE_BULK_OUT
24
23
#define EP_TYPE_BULK_IN_MIDI EP_TYPE_BULK_IN
24
+ #endif
25
25
26
- #else
27
-
26
+ #if defined(ARDUINO_ARCH_SAM)
28
27
#define EP_TYPE_BULK_IN_MIDI (UOTGHS_DEVEPTCFG_EPSIZE_64_BYTE | \
29
28
UOTGHS_DEVEPTCFG_EPDIR_IN | \
30
29
UOTGHS_DEVEPTCFG_EPTYPE_BLK | \
@@ -39,6 +38,11 @@ typedef struct
39
38
UOTGHS_DEVEPTCFG_ALLOC)
40
39
#endif
41
40
41
+ #if defined(__SAMD21G18A__)
42
+ #define EP_TYPE_BULK_IN_MIDI USB_ENDPOINT_TYPE_BULK | USB_ENDPOINT_IN(0 );
43
+ #define EP_TYPE_BULK_OUT_MIDI USB_ENDPOINT_TYPE_BULK | USB_ENDPOINT_OUT(0 );
44
+ #endif
45
+
42
46
class MIDI_
43
47
{
44
48
// private:
You can’t perform that action at this time.
0 commit comments