Get rid of the redundant ATTR_NEVER_INLINE macro which translated to the same as...
[pub/USBasp.git] / Projects / MIDIToneGenerator / Descriptors.h
index 2fb5821..dab2fd5 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2012.
+     Copyright (C) Dean Camera, 2013.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2013  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -18,7 +18,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
-  The author disclaim all warranties with regard to this
+  The author disclaims all warranties with regard to this
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
 
                #include <avr/pgmspace.h>
 
 
                #include <avr/pgmspace.h>
 
+               #include "Config/AppConfig.h"
+
        /* Macros: */
        /* Macros: */
-               /** Endpoint number of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
-               #define MIDI_STREAM_IN_EPNUM        2
+               /** Endpoint address of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
+               #define MIDI_STREAM_IN_EPADDR       (ENDPOINT_DIR_IN  | 2)
 
 
-               /** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
-               #define MIDI_STREAM_OUT_EPNUM       1
+               /** Endpoint address of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
+               #define MIDI_STREAM_OUT_EPADDR      (ENDPOINT_DIR_OUT | 1)
 
                /** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */
                #define MIDI_STREAM_EPSIZE          64
 
                /** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */
                #define MIDI_STREAM_EPSIZE          64
                        USB_MIDI_Descriptor_Jack_Endpoint_t       MIDI_Out_Jack_Endpoint_SPC;
                } USB_Descriptor_Configuration_t;
 
                        USB_MIDI_Descriptor_Jack_Endpoint_t       MIDI_Out_Jack_Endpoint_SPC;
                } USB_Descriptor_Configuration_t;
 
+               /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+                *  should have a unique ID index associated with it, which can be used to refer to the
+                *  interface from other descriptors.
+                */
+               enum InterfaceDescriptors_t
+               {
+                       INTERFACE_ID_AudioControl = 0, /**< Audio control interface descriptor ID */
+                       INTERFACE_ID_AudioStream  = 1, /**< Audio stream interface descriptor ID */
+               };
+
+               /** Enum for the device string descriptor IDs within the device. Each string descriptor should
+                *  have a unique ID index associated with it, which can be used to refer to the string from
+                *  other descriptors.
+                */
+               enum StringDescriptors_t
+               {
+                       STRING_ID_Language     = 0, /**< Supported Languages string descriptor ID (must be zero) */
+                       STRING_ID_Manufacturer = 1, /**< Manufacturer string ID */
+                       STRING_ID_Product      = 2, /**< Product string ID */
+               };
+
        /* Function Prototypes: */
                uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                                                    const uint8_t wIndex,
        /* Function Prototypes: */
                uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                                                    const uint8_t wIndex,