Data Structures | |
struct | USB_ClassInfo_MIDI_Device_t |
Functions | |
bool | MIDI_Device_ConfigureEndpoints (USB_ClassInfo_MIDI_Device_t *const MIDIInterfaceInfo) |
void | MIDI_Device_ProcessControlRequest (USB_ClassInfo_MIDI_Device_t *const MIDIInterfaceInfo) |
void | MIDI_Device_USBTask (USB_ClassInfo_MIDI_Device_t *const MIDIInterfaceInfo) |
void | MIDI_Device_SendEventPacket (USB_ClassInfo_MIDI_Device_t *const MIDIInterfaceInfo, MIDI_EventPacket_t *const Event) |
bool | MIDI_Device_ReceiveEventPacket (USB_ClassInfo_MIDI_Device_t *const MIDIInterfaceInfo, MIDI_EventPacket_t *const Event) |
bool MIDI_Device_ConfigureEndpoints | ( | USB_ClassInfo_MIDI_Device_t *const | MIDIInterfaceInfo | ) |
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.
[in,out] | MIDIInterfaceInfo | Pointer to a structure containing a MIDI Class configuration and state. |
void MIDI_Device_ProcessControlRequest | ( | USB_ClassInfo_MIDI_Device_t *const | MIDIInterfaceInfo | ) |
Processes incomming 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.
[in,out] | MIDIInterfaceInfo | Pointer to a structure containing a MIDI Class configuration and state. |
bool MIDI_Device_ReceiveEventPacket | ( | USB_ClassInfo_MIDI_Device_t *const | MIDIInterfaceInfo, | |
MIDI_EventPacket_t *const | Event | |||
) |
Receives a MIDI event packet from the host.
[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 |
void MIDI_Device_SendEventPacket | ( | USB_ClassInfo_MIDI_Device_t *const | MIDIInterfaceInfo, | |
MIDI_EventPacket_t *const | Event | |||
) |
Sends a MIDI event packet to the host. If no host is connected, the event packet is discarded.
[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 |
void MIDI_Device_USBTask | ( | USB_ClassInfo_MIDI_Device_t *const | MIDIInterfaceInfo | ) |
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().
[in,out] | MIDIInterfaceInfo | Pointer to a structure containing a MIDI Class configuration and state. |