Fixed MIDI_Host_Flush() not aborting early when the specified MIDI host interface...
[pub/USBasp.git] / Demos / Device / LowLevel / MIDI / Descriptors.h
index 7068610..e110cc2 100644 (file)
                #include <avr/pgmspace.h>
 
        /* Macros: */
-               /** Descriptor header constant to indicate a Audio class interface descriptor. */
-               #define DTYPE_AudioInterface        0x24
-
-               /** Descriptor header constant to indicate a Audio class endpoint descriptor. */
-               #define DTYPE_AudioEndpoint         0x25
-
                /** Audio class descriptor subtype value for a Audio class specific header descriptor. */
-               #define DSUBTYPE_Header             0x01
+               #define DSUBTYPE_AudioHeader        0x01
 
                /** Audio class descriptor subtype value for a Audio class specific MIDI input jack descriptor. */
                #define DSUBTYPE_InputJack          0x02
                /** Audio class descriptor jack type value for an external (physical) MIDI input or output jack. */
                #define JACKTYPE_EXTERNAL           0x02
                
-               /** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
-               #define MIDI_STREAM_OUT_EPNUM       1
-
                /** Endpoint number of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
-               #define MIDI_STREAM_IN_EPNUM        2
+               #define MIDI_STREAM_IN_EPNUM        1
+
+               /** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
+               #define MIDI_STREAM_OUT_EPNUM       2
 
                /** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */
                #define MIDI_STREAM_EPSIZE          64
@@ -85,7 +79,7 @@
                        USB_Descriptor_Header_t   Header; /**< Regular descriptor header containing the descriptor's type and length */
                        uint8_t                   Subtype; /**< Sub type value used to distinguish between audio class specific descriptors */
 
-                       uint16_t                  ACSpecification; /**< Binary coded decimal value, indicating the supported Audio Class specification version */
+                       uint16_t                  AudioSpecification; /**< Binary coded decimal value, indicating the supported Audio Class specification version */
                        uint16_t                  TotalLength; /**< Total length of the Audio class specific control descriptors, including this descriptor */
                        
                        uint8_t                   InCollection; /**< Total number of audio class interfaces within this device */
                } USB_Descriptor_Configuration_t;
                
        /* Function Prototypes: */
-               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
-                                                                                       ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+               uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
+                                                   const uint8_t wIndex,
+                                                   const void** const DescriptorAddress)
+                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif