Remove USB_MODE_* macros, replace with a semantically linked USB_Modes_t enum.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Common / MIDI.h
index 0c6223b..b3a4038 100644 (file)
                #endif
                
        /* Macros: */
                #endif
                
        /* Macros: */
-               /** Audio class descriptor subtype value for a Audio class-specific MIDI input jack descriptor. */
-               #define DSUBTYPE_InputJack          0x02
-
-               /** Audio class descriptor subtype value for a Audio class-specific MIDI output jack descriptor. */
-               #define DSUBTYPE_OutputJack         0x03
-               
-               /** Audio class descriptor jack type value for an embedded (logical) MIDI input or output jack. */
-               #define MIDI_JACKTYPE_EMBEDDED      0x01
-
-               /** Audio class descriptor jack type value for an external (physical) MIDI input or output jack. */
-               #define MIDI_JACKTYPE_EXTERNAL      0x02
-
                /** MIDI command for a note on (activation) event. */
                #define MIDI_COMMAND_NOTE_ON        0x90
 
                /** MIDI command for a note on (activation) event. */
                #define MIDI_COMMAND_NOTE_ON        0x90
 
                 *  \param[in] channel  MIDI channel number to address.
                 */
                #define MIDI_CHANNEL(channel)        ((channel) - 1)
                 *  \param[in] channel  MIDI channel number to address.
                 */
                #define MIDI_CHANNEL(channel)        ((channel) - 1)
+       
+       /* Enums: */
+               enum MIDI_JackTypes_t
+               {
+                       MIDI_JACKTYPE_Embedded = 0x01, /**< MIDI class descriptor jack type value for an embedded (logical) MIDI input or output jack. */
+                       MIDI_JACKTYPE_External = 0x02, /**< MIDI class descriptor jack type value for an external (physical) MIDI input or output jack. */
+               };
                
        /* Type Defines: */
                /** \brief MIDI class-specific Streaming Interface Descriptor (LUFA naming conventions).
                
        /* Type Defines: */
                /** \brief MIDI class-specific Streaming Interface Descriptor (LUFA naming conventions).
                        uint8_t                 Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
                        
                        uint16_t                AudioSpecification; /**< Binary coded decimal value, indicating the supported Audio Class
                        uint8_t                 Subtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
                        
                        uint16_t                AudioSpecification; /**< Binary coded decimal value, indicating the supported Audio Class
-                                                                      *   specification version.
-                                                                      */
+                                                                    *   specification version.
+                                                                    */
                        uint16_t                TotalLength; /**< Total length of the Audio class-specific descriptors, including this descriptor. */
                } USB_MIDI_Descriptor_AudioInterface_AS_t;
                
                        uint16_t                TotalLength; /**< Total length of the Audio class-specific descriptors, including this descriptor. */
                } USB_MIDI_Descriptor_AudioInterface_AS_t;
                
                {
                        uint8_t  bLength; /**< Size of the descriptor, in bytes. */
                        uint8_t  bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
                {
                        uint8_t  bLength; /**< Size of the descriptor, in bytes. */
                        uint8_t  bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
-                                                     *   given by the specific class.
-                                                     */
+                                                  *   given by the specific class.
+                                                  */
 
                        uint8_t  bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
                        
 
                        uint8_t  bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
                        
                        uint8_t                 JackStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */
                } USB_MIDI_Descriptor_InputJack_t;
 
                        uint8_t                 JackStrIndex; /**< Index of a string descriptor describing this descriptor within the device. */
                } USB_MIDI_Descriptor_InputJack_t;
 
-
                /** \brief MIDI class-specific Input Jack Descriptor (USB-IF naming conventions).
                 *
                 *  Type define for an Audio class-specific MIDI IN jack. This gives information to the host on a MIDI input, either
                /** \brief MIDI class-specific Input Jack Descriptor (USB-IF naming conventions).
                 *
                 *  Type define for an Audio class-specific MIDI IN jack. This gives information to the host on a MIDI input, either
                {
                        uint8_t  bLength; /**< Size of the descriptor, in bytes. */
                        uint8_t  bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
                {
                        uint8_t  bLength; /**< Size of the descriptor, in bytes. */
                        uint8_t  bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
-                                                     *   given by the specific class.
-                                                     */
+                                                  *   given by the specific class.
+                                                  */
 
                        uint8_t  bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
 
 
                        uint8_t  bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
 
                {
                        uint8_t  bLength; /**< Size of the descriptor, in bytes. */
                        uint8_t  bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
                {
                        uint8_t  bLength; /**< Size of the descriptor, in bytes. */
                        uint8_t  bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
-                                                     *   given by the specific class.
-                                                     */
+                                                  *   given by the specific class.
+                                                  */
 
                        uint8_t  bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
 
 
                        uint8_t  bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
 
                {
                        uint8_t  bLength; /**< Size of the descriptor, in bytes. */
                        uint8_t  bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
                {
                        uint8_t  bLength; /**< Size of the descriptor, in bytes. */
                        uint8_t  bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
-                                                     *   given by the specific class.
-                                                     */
+                                                  *   given by the specific class.
+                                                  */
 
                        uint8_t  bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */
 
 
                        uint8_t  bDescriptorSubtype; /**< Sub type value used to distinguish between audio class-specific descriptors. */