Detailed Description
The following files must be built with any user project that uses this module:
- LUFA/Drivers/USB/Class/Device/MIDI.c
Device Mode USB Class driver framework interface, for the MIDI USB Class driver.
Function Documentation
Configures the endpoints of a given MIDI interface, ready for use. This should be linked to the library EVENT_USB_Device_ConfigurationChanged() event so that the endpoints are configured when the configuration containing the given MIDI interface is selected.
- Parameters:
-
[in,out] | MIDIInterfaceInfo | Pointer to a structure containing a MIDI Class configuration and state |
- Returns:
- Boolean true if the endpoints were successfully configured, false otherwise
Processes incoming control requests from the host, that are directed to the given MIDI class interface. This should be linked to the library EVENT_USB_Device_UnhandledControlRequest() event.
- Parameters:
-
[in,out] | MIDIInterfaceInfo | Pointer to a structure containing a MIDI Class configuration and state |
Receives a MIDI event packet from the host.
- Parameters:
-
[in,out] | MIDIInterfaceInfo | Pointer to a structure containing a MIDI Class configuration and state |
[out] | Event | Pointer to a USB_MIDI_EventPacket_t structure where the received MIDI event is to be placed |
- Returns:
- Boolean true if a MIDI event packet was received, false otherwise
Sends a MIDI event packet to the host. If no host is connected, the event packet is discarded.
- Parameters:
-
[in,out] | MIDIInterfaceInfo | Pointer to a structure containing a MIDI Class configuration and state |
[in] | Event | Pointer to a populated USB_MIDI_EventPacket_t structure containing the MIDI event to send |
- Returns:
- A value from the Endpoint_Stream_RW_ErrorCodes_t enum
General management task for a given MIDI class interface, required for the correct operation of the interface. This should be called frequently in the main program loop, before the master USB management task USB_USBTask().
- Parameters:
-
[in,out] | MIDIInterfaceInfo | Pointer to a structure containing a MIDI Class configuration and state |