aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/LowLevel/AudioOutput/Descriptors.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-10-24 22:53:57 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-10-24 22:53:57 +0000
commitb37d77eab32d171ad7b28157a924a4026e2aebd1 (patch)
tree0644f7ed8f76db5e0849195e09892b159df9f475 /Demos/Device/LowLevel/AudioOutput/Descriptors.c
parent8f3bee7d8661c92ce69fdf7cc131fbee1acaa4ae (diff)
downloadlufa-b37d77eab32d171ad7b28157a924a4026e2aebd1.tar.gz
lufa-b37d77eab32d171ad7b28157a924a4026e2aebd1.tar.bz2
lufa-b37d77eab32d171ad7b28157a924a4026e2aebd1.zip
All USB class drivers are now automatically included when LUFA/Drivers/USB.h is included, and no longer need to be seperately included.
All LowLevel demos changed to use the constants and types defined in the USB class drivers.
Diffstat (limited to 'Demos/Device/LowLevel/AudioOutput/Descriptors.c')
-rw-r--r--Demos/Device/LowLevel/AudioOutput/Descriptors.c47
1 files changed, 23 insertions, 24 deletions
diff --git a/Demos/Device/LowLevel/AudioOutput/Descriptors.c b/Demos/Device/LowLevel/AudioOutput/Descriptors.c
index cc3d8ccae..d177c31c3 100644
--- a/Demos/Device/LowLevel/AudioOutput/Descriptors.c
+++ b/Demos/Device/LowLevel/AudioOutput/Descriptors.c
@@ -104,29 +104,29 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_ControlInterface_SPC =
{
- .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_CSInterface},
- .Subtype = DSUBTYPE_AudioHeader,
+ .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_CSInterface},
+ .Subtype = AUDIO_DSUBTYPE_CSInterface_Header,
.ACSpecification = VERSION_BCD(01.00),
- .TotalLength = (sizeof(USB_Audio_Interface_AC_t) +
- sizeof(USB_Audio_InputTerminal_t) +
- sizeof(USB_Audio_OutputTerminal_t)),
+ .TotalLength = (sizeof(USB_Audio_Descriptor_Interface_AC_t) +
+ sizeof(USB_Audio_Descriptor_InputTerminal_t) +
+ sizeof(USB_Audio_Descriptor_OutputTerminal_t)),
.InCollection = 1,
- .InterfaceNumbers = {1},
+ .InterfaceNumber = 1,
},
.Audio_InputTerminal =
{
- .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_CSInterface},
- .Subtype = DSUBTYPE_InputTerminal,
+ .Header = {.Size = sizeof(USB_Audio_Descriptor_InputTerminal_t), .Type = DTYPE_CSInterface},
+ .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal,
.TerminalID = 0x01,
- .TerminalType = TERMINAL_STREAMING,
+ .TerminalType = AUDIO_TERMINAL_STREAMING,
.AssociatedOutputTerminal = 0x00,
.TotalChannels = 2,
- .ChannelConfig = (CHANNEL_LEFT_FRONT | CHANNEL_RIGHT_FRONT),
+ .ChannelConfig = (AUDIO_CHANNEL_LEFT_FRONT | AUDIO_CHANNEL_RIGHT_FRONT),
.ChannelStrIndex = NO_DESCRIPTOR,
.TerminalStrIndex = NO_DESCRIPTOR
@@ -134,11 +134,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_OutputTerminal =
{
- .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_CSInterface},
- .Subtype = DSUBTYPE_OutputTerminal,
+ .Header = {.Size = sizeof(USB_Audio_Descriptor_OutputTerminal_t), .Type = DTYPE_CSInterface},
+ .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal,
.TerminalID = 0x02,
- .TerminalType = TERMINAL_OUT_SPEAKER,
+ .TerminalType = AUDIO_TERMINAL_OUT_SPEAKER,
.AssociatedInputTerminal = 0x00,
.SourceID = 0x01,
@@ -180,8 +180,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_StreamInterface_SPC =
{
- .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_CSInterface},
- .Subtype = DSUBTYPE_General,
+ .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AS_t), .Type = DTYPE_CSInterface},
+ .Subtype = AUDIO_DSUBTYPE_CSInterface_General,
.TerminalLink = 0x01,
@@ -191,8 +191,8 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_AudioFormat =
{
- .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_CSInterface},
- .Subtype = DSUBTYPE_Format,
+ .Header = {.Size = sizeof(USB_Audio_Descriptor_Format_t), .Type = DTYPE_CSInterface},
+ .Subtype = AUDIO_DSUBTYPE_CSInterface_FormatType,
.FormatType = 0x01,
.Channels = 0x02,
@@ -200,16 +200,15 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.SubFrameSize = 0x02,
.BitResolution = 16,
- .SampleFrequencyType = (sizeof(ConfigurationDescriptor.Audio_AudioFormat.SampleFrequencies) /
- sizeof(Audio_SampleFreq_t)),
- .SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
+ .SampleFrequencyType = AUDIO_TOTAL_SAMPLE_RATES,
+ .SampleFrequencies = {AUDIO_SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
},
.Audio_StreamEndpoint =
{
.Endpoint =
{
- .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | AUDIO_STREAM_EPNUM),
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
@@ -223,10 +222,10 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_StreamEndpoint_SPC =
{
- .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_CSEndpoint},
- .Subtype = DSUBTYPE_General,
+ .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Spc_t), .Type = DTYPE_CSEndpoint},
+ .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General,
- .Attributes = EP_ACCEPTS_SMALL_PACKETS,
+ .Attributes = AUDIO_EP_ACCEPTS_SMALL_PACKETS,
.LockDelayUnits = 0x00,
.LockDelay = 0x0000