Reintegrate the FullEPAddresses development branch into trunk.
This commit is contained in:
parent
e8570c4a37
commit
47f6a35013
265 changed files with 2120 additions and 2486 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 1
|
||||
/** Endpoint address of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
|
||||
#define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | 1)
|
||||
|
||||
/** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
|
||||
#define MIDI_STREAM_OUT_EPNUM 2
|
||||
/** Endpoint address of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
|
||||
#define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
|
||||
|
||||
/** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */
|
||||
#define MIDI_STREAM_EPSIZE 64
|
||||
|
|
|
|||
|
|
@ -94,10 +94,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
|
|||
bool ConfigSuccess = true;
|
||||
|
||||
/* Setup MIDI Data Endpoints */
|
||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
|
||||
MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
|
||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
|
||||
MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE);
|
||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, 1);
|
||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, 1);
|
||||
|
||||
/* Indicate endpoint configuration success or failure */
|
||||
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
|
||||
|
|
@ -114,7 +112,7 @@ void MIDI_Task(void)
|
|||
if (USB_DeviceState != DEVICE_STATE_Configured)
|
||||
return;
|
||||
|
||||
Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPNUM);
|
||||
Endpoint_SelectEndpoint(MIDI_STREAM_IN_EPADDR);
|
||||
|
||||
if (Endpoint_IsINReady())
|
||||
{
|
||||
|
|
@ -182,7 +180,7 @@ void MIDI_Task(void)
|
|||
}
|
||||
|
||||
/* Select the MIDI OUT stream */
|
||||
Endpoint_SelectEndpoint(MIDI_STREAM_OUT_EPNUM);
|
||||
Endpoint_SelectEndpoint(MIDI_STREAM_OUT_EPADDR);
|
||||
|
||||
/* Check if a MIDI command has been received */
|
||||
if (Endpoint_IsOUTReceived())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue