LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
MIDIClassHost.c File Reference
#include "../../Core/USBMode.h"
#include "MIDIClassHost.h"

Go to the source code of this file.

Functions

uint8_t MIDI_Host_ConfigurePipes (USB_ClassInfo_MIDI_Host_t *const MIDIInterfaceInfo, uint16_t ConfigDescriptorSize, void *ConfigDescriptorData)
 Host interface configuration routine, to configure a given MIDI host interface instance using the Configuration Descriptor read from an attached USB device. This function automatically updates the given MIDI Host instance's state values and configures the pipes required to communicate with the interface if it is found within the device. This should be called once after the stack has enumerated the attached device, while the host state machine is in the Addressed state.
 
static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingInterface (void *const CurrentDescriptor)
 
static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingDataEndpoint (void *const CurrentDescriptor)
 
void MIDI_Host_USBTask (USB_ClassInfo_MIDI_Host_t *const MIDIInterfaceInfo)
 General management task for a given MIDI host 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().
 
uint8_t MIDI_Host_Flush (USB_ClassInfo_MIDI_Host_t *const MIDIInterfaceInfo)
 Flushes the MIDI send buffer, sending any queued MIDI events to the device. This should be called to override the MIDI_Host_SendEventPacket() function's packing behaviour, to flush queued events. Events are queued into the pipe bank until either the pipe bank is full, or MIDI_Host_Flush() is called. This allows for multiple MIDI events to be packed into a single pipe packet, increasing data throughput.
 
uint8_t MIDI_Host_SendEventPacket (USB_ClassInfo_MIDI_Host_t *const MIDIInterfaceInfo, MIDI_EventPacket_t *const Event)
 Sends a MIDI event packet to the device. If no device is connected, the event packet is discarded.
 
bool MIDI_Host_ReceiveEventPacket (USB_ClassInfo_MIDI_Host_t *const MIDIInterfaceInfo, MIDI_EventPacket_t *const Event)
 Receives a MIDI event packet from the device.
 

Function Documentation

static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingDataEndpoint ( void *const  CurrentDescriptor)
static

Definition at line 149 of file MIDIClassHost.c.

static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingInterface ( void *const  CurrentDescriptor)
static

Definition at line 130 of file MIDIClassHost.c.