Get rid of the redundant ATTR_NEVER_INLINE macro which translated to the same as...
[pub/USBasp.git] / Projects / MIDIToneGenerator / Descriptors.c
index 53b11c6..541ee81 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2012.
+     Copyright (C) Dean Camera, 2013.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2012  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
@@ -57,8 +57,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
        .ProductID              = 0x2048,
        .ReleaseNumber          = VERSION_BCD(00.01),
 
-       .ManufacturerStrIndex   = 0x01,
-       .ProductStrIndex        = 0x02,
+       .ManufacturerStrIndex   = STRING_ID_Manufacturer,
+       .ProductStrIndex        = STRING_ID_Product,
        .SerialNumStrIndex      = NO_DESCRIPTOR,
 
        .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
@@ -90,7 +90,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                {
                        .Header                   = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
 
-                       .InterfaceNumber          = 0,
+                       .InterfaceNumber          = INTERFACE_ID_AudioControl,
                        .AlternateSetting         = 0,
 
                        .TotalEndpoints           = 0,
@@ -111,14 +111,14 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .TotalLength              = sizeof(USB_Audio_Descriptor_Interface_AC_t),
 
                        .InCollection             = 1,
-                       .InterfaceNumber          = 1,
+                       .InterfaceNumber          = INTERFACE_ID_AudioStream,
                },
 
        .Audio_StreamInterface =
                {
                        .Header                   = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
 
-                       .InterfaceNumber          = 1,
+                       .InterfaceNumber          = INTERFACE_ID_AudioStream,
                        .AlternateSetting         = 0,
 
                        .TotalEndpoints           = 2,
@@ -306,15 +306,15 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                case DTYPE_String:
                        switch (DescriptorNumber)
                        {
-                               case 0x00:
+                               case STRING_ID_Language:
                                        Address = &LanguageString;
                                        Size    = pgm_read_byte(&LanguageString.Header.Size);
                                        break;
-                               case 0x01:
+                               case STRING_ID_Manufacturer:
                                        Address = &ManufacturerString;
                                        Size    = pgm_read_byte(&ManufacturerString.Header.Size);
                                        break;
-                               case 0x02:
+                               case STRING_ID_Product:
                                        Address = &ProductString;
                                        Size    = pgm_read_byte(&ProductString.Header.Size);
                                        break;