Add new MIDI Host Class driver to the library, and new MIDIHost ClassDriver demo.

Make MouseHost and KeyboardHost ClassDriver demos use the HID Class driver's structures for the boot protocol Mouse/Keyboard report data, rather than rolling their own.
This commit is contained in:
Dean Camera 2009-10-08 08:46:27 +00:00
parent 664a292181
commit c7bc3ec391
24 changed files with 3014 additions and 79 deletions

View file

@ -89,7 +89,7 @@
* \ref EVENT_USB_Device_ConfigurationChanged() event so that the endpoints are configured when the configuration
* containing the given MIDI interface is selected.
*
* \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state.
* \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state
*
* \return Boolean true if the endpoints were sucessfully configured, false otherwise
*/
@ -98,20 +98,20 @@
/** Processes incomming control requests from the host, that are directed to the given MIDI class interface. This should be
* linked to the library \ref EVENT_USB_Device_UnhandledControlRequest() event.
*
* \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state.
* \param[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) ATTR_NON_NULL_PTR_ARG(1);
/** 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 \ref USB_USBTask().
*
* \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state.
* \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state
*/
void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
/** Sends a MIDI event packet to the host. If no host is connected, the event packet is discarded.
*
* \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state.
* \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state
* \param[in] Event Pointer to a populated USB_MIDI_EventPacket_t structure containing the MIDI event to send
*
* \return A value from the \ref Endpoint_Stream_RW_ErrorCodes_t enum
@ -121,7 +121,7 @@
/** Receives a MIDI event packet from the host.
*
* \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state.
* \param[in,out] MIDIInterfaceInfo Pointer to a structure containing a MIDI Class configuration and state
* \param[out] Event Pointer to a USB_MIDI_EventPacket_t structure where the received MIDI event is to be placed
*
* \return Boolean true if a MIDI event packet was received, false otherwise