aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/MIDI
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver/MIDI')
-rw-r--r--Demos/Device/ClassDriver/MIDI/Descriptors.c4
-rw-r--r--Demos/Device/ClassDriver/MIDI/Descriptors.h8
-rw-r--r--Demos/Device/ClassDriver/MIDI/MIDI.c20
3 files changed, 18 insertions, 14 deletions
diff --git a/Demos/Device/ClassDriver/MIDI/Descriptors.c b/Demos/Device/ClassDriver/MIDI/Descriptors.c
index 9ad0e86a5..84898acf6 100644
--- a/Demos/Device/ClassDriver/MIDI/Descriptors.c
+++ b/Demos/Device/ClassDriver/MIDI/Descriptors.c
@@ -199,7 +199,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM),
+ .EndpointAddress = MIDI_STREAM_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
.PollingIntervalMS = 0x01
@@ -224,7 +224,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM),
+ .EndpointAddress = MIDI_STREAM_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Demos/Device/ClassDriver/MIDI/Descriptors.h b/Demos/Device/ClassDriver/MIDI/Descriptors.h
index c5dc2e217..83844449d 100644
--- a/Demos/Device/ClassDriver/MIDI/Descriptors.h
+++ b/Demos/Device/ClassDriver/MIDI/Descriptors.h
@@ -42,11 +42,11 @@
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
- #define MIDI_STREAM_IN_EPNUM 2
+ /** Endpoint address of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
+ #define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
- #define MIDI_STREAM_OUT_EPNUM 1
+ /** Endpoint address of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
+ #define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | 1)
/** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */
#define MIDI_STREAM_EPSIZE 64
diff --git a/Demos/Device/ClassDriver/MIDI/MIDI.c b/Demos/Device/ClassDriver/MIDI/MIDI.c
index 317c37db0..a55c6a70e 100644
--- a/Demos/Device/ClassDriver/MIDI/MIDI.c
+++ b/Demos/Device/ClassDriver/MIDI/MIDI.c
@@ -45,14 +45,18 @@ USB_ClassInfo_MIDI_Device_t Keyboard_MIDI_Interface =
.Config =
{
.StreamingInterfaceNumber = 1,
-
- .DataINEndpointNumber = MIDI_STREAM_IN_EPNUM,
- .DataINEndpointSize = MIDI_STREAM_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MIDI_STREAM_OUT_EPNUM,
- .DataOUTEndpointSize = MIDI_STREAM_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
+ .DataINEndpoint =
+ {
+ .Address = MIDI_STREAM_IN_EPADDR,
+ .Size = MIDI_STREAM_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MIDI_STREAM_OUT_EPADDR,
+ .Size = MIDI_STREAM_EPSIZE,
+ .Banks = 1,
+ },
},
};