X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/74b7c07e96562158de294f92baed4c83b4fce970..b9b03aadb219d06fbad9d110e508db93e45461af:/LUFA/Drivers/USB/Class/Device/MIDI.h diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.h b/LUFA/Drivers/USB/Class/Device/MIDI.h index 17823938c..08a530af2 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDI.h +++ b/LUFA/Drivers/USB/Class/Device/MIDI.h @@ -28,6 +28,21 @@ this software. */ +/** \ingroup Group_USBDeviceClassDrivers + * @defgroup Group_USBClassMIDIDevice MIDI Device Class Driver - LUFA/Drivers/Class/Device/MIDI.h + * + * \section Sec_Dependencies Module Source Dependencies + * The following files must be built with any user project that uses this module: + * - LUFA/Drivers/USB/Class/Device/MIDI.c + * + * \section Module Description + * Functions, macros, variables, enums and types related to the management of USB MIDI Class interfaces + * within a USB device. Note that the MIDI class is actually a special case of the regular Audio class, + * thus this module depends on structure definitions from the \ref Group_USBClassAudioDevice class driver module. + * + * @{ + */ + #ifndef _MIDI_CLASS_H_ #define _MIDI_CLASS_H_ @@ -37,6 +52,11 @@ #include + /* Enable C linkage for C++ Compilers: */ + #if defined(__cplusplus) + extern "C" { + #endif + /* Macros: */ /** Audio class descriptor subtype value for a Audio class specific MIDI input jack descriptor. */ #define DSUBTYPE_InputJack 0x02 @@ -45,10 +65,10 @@ #define DSUBTYPE_OutputJack 0x03 /** Audio class descriptor jack type value for an embedded (logical) MIDI input or output jack. */ - #define JACKTYPE_EMBEDDED 0x01 + #define MIDI_JACKTYPE_EMBEDDED 0x01 /** Audio class descriptor jack type value for an external (physical) MIDI input or output jack. */ - #define JACKTYPE_EXTERNAL 0x02 + #define MIDI_JACKTYPE_EXTERNAL 0x02 /** MIDI command for a note on (activation) event */ #define MIDI_COMMAND_NOTE_ON 0x09 @@ -56,7 +76,7 @@ /** MIDI command for a note off (deactivation) event */ #define MIDI_COMMAND_NOTE_OFF 0x08 - /** Standard key press velocity value used for all note events, as no pressure sensor is mounted */ + /** Standard key press velocity value used for all note events */ #define MIDI_STANDARD_VELOCITY 64 /** Convenience macro. MIDI channels are numbered from 1-10 (natural numbers) however the logical channel @@ -137,7 +157,7 @@ typedef struct { - uint8_t InterfaceNumber; + uint8_t StreamingInterfaceNumber; uint8_t DataINEndpointNumber; uint16_t DataINEndpointSize; @@ -150,9 +170,17 @@ /* Function Prototypes: */ bool USB_MIDI_ConfigureEndpoints(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo); + void USB_MIDI_ProcessControlPacket(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo); void USB_MIDI_USBTask(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo); void USB_MIDI_SendEventPacket(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo, USB_MIDI_EventPacket_t* Event); bool USB_MIDI_ReceiveEventPacket(USB_ClassInfo_MIDI_t* MIDIInterfaceInfo, USB_MIDI_EventPacket_t* Event); + /* Disable C linkage for C++ Compilers: */ + #if defined(__cplusplus) + } + #endif + #endif + +/** @} */