Fix up the incomplete Webserver project so that it integrates with the uIP stack...
[pub/USBasp.git] / Demos / Device / ClassDriver / AudioInput / Descriptors.c
index 8bb7660..42da1a8 100644 (file)
@@ -1,21 +1,21 @@
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
-  Permission to use, copy, modify, and distribute this software\r
-  and its documentation for any purpose and without fee is hereby\r
-  granted, provided that the above copyright notice appear in all\r
-  copies and that both that the copyright notice and this\r
-  permission notice and warranty disclaimer appear in supporting\r
-  documentation, and that the name of the author not be used in\r
-  advertising or publicity pertaining to distribution of the\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+\r
+  Permission to use, copy, modify, distribute, and sell this \r
+  software and its documentation for any purpose is hereby granted\r
+  without fee, provided that the above copyright notice appear in \r
+  all copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting \r
+  documentation, and that the name of the author not be used in \r
+  advertising or publicity pertaining to distribution of the \r
   software without specific, written prior permission.\r
 \r
   The author disclaim all warranties with regard to this\r
@@ -61,7 +61,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
        .ProductStrIndex        = 0x02,\r
        .SerialNumStrIndex      = NO_DESCRIPTOR,\r
 \r
-       .NumberOfConfigurations = 1\r
+       .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS\r
 };\r
 \r
 /** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
@@ -104,13 +104,13 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 \r
        .AudioControlInterface_SPC = \r
                {\r
-                       .Header                   = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},\r
+                       .Header                   = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_AudioInterface},\r
                        .Subtype                  = DSUBTYPE_Header,\r
 \r
                        .ACSpecification          = VERSION_BCD(01.00),\r
-                       .TotalLength              = (sizeof(USB_AudioInterface_AC_t) +\r
-                                                    sizeof(USB_AudioInputTerminal_t) +\r
-                                                    sizeof(USB_AudioOutputTerminal_t)),\r
+                       .TotalLength              = (sizeof(USB_Audio_Interface_AC_t) +\r
+                                                    sizeof(USB_Audio_InputTerminal_t) +\r
+                                                    sizeof(USB_Audio_OutputTerminal_t)),\r
                        \r
                        .InCollection             = 1,\r
                        .InterfaceNumbers         = {1},\r
@@ -118,7 +118,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 \r
        .InputTerminal = \r
                {\r
-                       .Header                   = {.Size = sizeof(USB_AudioInputTerminal_t), .Type = DTYPE_AudioInterface},\r
+                       .Header                   = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_AudioInterface},\r
                        .Subtype                  = DSUBTYPE_InputTerminal,\r
 \r
                        .TerminalID               = 0x01,\r
@@ -134,7 +134,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 \r
        .OutputTerminal = \r
                {\r
-                       .Header                   = {.Size = sizeof(USB_AudioOutputTerminal_t), .Type = DTYPE_AudioInterface},\r
+                       .Header                   = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_AudioInterface},\r
                        .Subtype                  = DSUBTYPE_OutputTerminal,\r
 \r
                        .TerminalID               = 0x02,\r
@@ -180,7 +180,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 \r
        .AudioStreamInterface_SPC = \r
                {\r
-                       .Header                   = {.Size = sizeof(USB_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},\r
+                       .Header                   = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_AudioInterface},\r
                        .Subtype                  = DSUBTYPE_General,\r
 \r
                        .TerminalLink             = 0x02,\r
@@ -191,7 +191,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 \r
        .AudioFormat = \r
                {\r
-                       .Header                   = {.Size = sizeof(USB_AudioFormat_t), .Type = DTYPE_AudioInterface},\r
+                       .Header                   = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_AudioInterface},\r
                        .Subtype                  = DSUBTYPE_Format,\r
 \r
                        .FormatType               = 0x01,\r
@@ -199,7 +199,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        \r
                        .SubFrameSize             = 0x02,\r
                        .BitResolution            = 16,\r
-                       .SampleFrequencyType      = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)),\r
+                       .SampleFrequencyType      = AUDIO_TOTAL_SAMPLE_RATES,\r
                \r
                        .SampleFrequencies        = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}\r
                },\r
@@ -208,7 +208,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                {\r
                        .Endpoint = \r
                                {\r
-                                       .Header              = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
+                                       .Header              = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
 \r
                                        .EndpointAddress     = (ENDPOINT_DESCRIPTOR_DIR_IN | AUDIO_STREAM_EPNUM),\r
                                        .Attributes          = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),\r
@@ -222,7 +222,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                \r
        .AudioEndpoint_SPC = \r
                {\r
-                       .Header                   = {.Size = sizeof(USB_AudioStreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
+                       .Header                   = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
                        .Subtype                  = DSUBTYPE_General,\r
                        \r
                        .Attributes               = 0x00,\r