Minor updates to the Benito programmer - remove redundant PORT register manipulations.
[pub/USBasp.git] / Demos / Device / ClassDriver / AudioOutput / Descriptors.c
index 0039c2b..8604c45 100644 (file)
 USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
 {\r
        .Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
-               \r
+\r
        .USBSpecification       = VERSION_BCD(02.00),\r
        .Class                  = 0x00,\r
        .SubClass               = 0x00,\r
        .Protocol               = 0x00,\r
-                               \r
+\r
        .Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,\r
-               \r
+\r
        .VendorID               = 0x03EB,\r
        .ProductID              = 0x2046,\r
        .ReleaseNumber          = 0x0000,\r
-               \r
+\r
        .ManufacturerStrIndex   = 0x01,\r
        .ProductStrIndex        = 0x02,\r
        .SerialNumStrIndex      = NO_DESCRIPTOR,\r
-               \r
+\r
        .NumberOfConfigurations = 1\r
 };\r
 \r
@@ -80,7 +80,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 \r
                        .ConfigurationNumber      = 1,\r
                        .ConfigurationStrIndex    = NO_DESCRIPTOR,\r
-                               \r
+                       \r
                        .ConfigAttributes         = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
                        \r
                        .MaxPowerConsumption      = USB_CONFIG_POWER_MA(100)\r
@@ -94,31 +94,31 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .AlternateSetting         = 0,\r
                        \r
                        .TotalEndpoints           = 0,\r
-                               \r
+                       \r
                        .Class                    = 0x01,\r
                        .SubClass                 = 0x01,\r
                        .Protocol                 = 0x00,\r
-                               \r
-                       .InterfaceStrIndex        = NO_DESCRIPTOR                       \r
+                       \r
+                       .InterfaceStrIndex        = NO_DESCRIPTOR\r
                },\r
        \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
+                       .InterfaceNumbers         = {1},\r
                },\r
 \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
@@ -143,7 +143,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        \r
                        .SourceID                 = 0x01,\r
                        \r
-                       .TerminalStrIndex         = NO_DESCRIPTOR                       \r
+                       .TerminalStrIndex         = NO_DESCRIPTOR\r
                },\r
 \r
        .AudioStreamInterface_Alt0 = \r
@@ -154,11 +154,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .AlternateSetting         = 0,\r
                        \r
                        .TotalEndpoints           = 0,\r
-                               \r
+                       \r
                        .Class                    = 0x01,\r
                        .SubClass                 = 0x02,\r
                        .Protocol                 = 0x00,\r
-                               \r
+                       \r
                        .InterfaceStrIndex        = NO_DESCRIPTOR\r
                },\r
 \r
@@ -170,17 +170,17 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .AlternateSetting         = 1,\r
                        \r
                        .TotalEndpoints           = 1,\r
-                               \r
+                       \r
                        .Class                    = 0x01,\r
                        .SubClass                 = 0x02,\r
                        .Protocol                 = 0x00,\r
-                               \r
+                       \r
                        .InterfaceStrIndex        = NO_DESCRIPTOR\r
                },\r
                \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             = 0x01,\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
@@ -200,7 +200,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                        .SubFrameSize             = 0x02,\r
                        .BitResolution            = 16,\r
 \r
-                       .SampleFrequencyType      = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)),                \r
+                       .SampleFrequencyType      = (AUDIO_TOTAL_SAMPLE_RATES * sizeof(USB_Audio_SampleFreq_t)),                \r
                        .SampleFrequencies        = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}\r
                },\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_OUT | 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               = EP_ACCEPTS_SMALL_PACKETS,\r
@@ -239,7 +239,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 USB_Descriptor_String_t PROGMEM LanguageString =\r
 {\r
        .Header                 = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
-               \r
+\r
        .UnicodeString          = {LANGUAGE_ID_ENG}\r
 };\r
 \r
@@ -250,7 +250,7 @@ USB_Descriptor_String_t PROGMEM LanguageString =
 USB_Descriptor_String_t PROGMEM ManufacturerString =\r
 {\r
        .Header                 = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
-               \r
+\r
        .UnicodeString          = L"Dean Camera"\r
 };\r
 \r
@@ -261,7 +261,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
 USB_Descriptor_String_t PROGMEM ProductString =\r
 {\r
        .Header                 = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},\r
-               \r
+\r
        .UnicodeString          = L"LUFA Audio Out Demo"\r
 };\r
 \r