projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix documentation reference error.
[pub/USBasp.git]
/
Demos
/
Device
/
LowLevel
/
AudioInput
/
Descriptors.c
diff --git
a/Demos/Device/LowLevel/AudioInput/Descriptors.c
b/Demos/Device/LowLevel/AudioInput/Descriptors.c
index
432f0c9
..
24f4a6a
100644
(file)
--- a/
Demos/Device/LowLevel/AudioInput/Descriptors.c
+++ b/
Demos/Device/LowLevel/AudioInput/Descriptors.c
@@
-3,7
+3,7
@@
Copyright (C) Dean Camera, 2010.
dean [at] fourwalledcubicle [dot] com
Copyright (C) Dean Camera, 2010.
dean [at] fourwalledcubicle [dot] com
- www.fourwalledcubicle.com
+ www.lufa-lib.org
*/
/*
*/
/*
@@
-47,9
+47,9
@@
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10),
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
.USBSpecification = VERSION_BCD(01.10),
- .Class =
0x00
,
- .SubClass =
0x00
,
- .Protocol =
0x00
,
+ .Class =
USB_CSCP_NoDeviceClass
,
+ .SubClass =
USB_CSCP_NoDeviceSubclass
,
+ .Protocol =
USB_CSCP_NoDeviceProtocol
,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
@@
-95,34
+95,34
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0,
.TotalEndpoints = 0,
- .Class =
0x01
,
- .SubClass =
0x01
,
- .Protocol =
0x00
,
+ .Class =
AUDIO_CSCP_AudioClass
,
+ .SubClass =
AUDIO_CSCP_ControlSubclass
,
+ .Protocol =
AUDIO_CSCP_ControlProtocol
,
.InterfaceStrIndex = NO_DESCRIPTOR
},
.Audio_ControlInterface_SPC =
{
.InterfaceStrIndex = NO_DESCRIPTOR
},
.Audio_ControlInterface_SPC =
{
- .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_CSInterface},
- .Subtype =
DSUBTYPE_Audio
Header,
+ .Header = {.Size = sizeof(USB_Audio_
Descriptor_
Interface_AC_t), .Type = DTYPE_CSInterface},
+ .Subtype =
AUDIO_DSUBTYPE_CSInterface_
Header,
.ACSpecification = VERSION_BCD(01.00),
.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,
.InCollection = 1,
- .InterfaceNumber
s = {1}
,
+ .InterfaceNumber
= 1
,
},
.Audio_InputTerminal =
{
},
.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,
.TerminalID = 0x01,
- .TerminalType = TERMINAL_IN_MIC,
+ .TerminalType =
AUDIO_
TERMINAL_IN_MIC,
.AssociatedOutputTerminal = 0x00,
.TotalChannels = 1,
.AssociatedOutputTerminal = 0x00,
.TotalChannels = 1,
@@
-134,11
+134,11
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_OutputTerminal =
{
.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,
.TerminalID = 0x02,
- .TerminalType = TERMINAL_STREAMING,
+ .TerminalType =
AUDIO_
TERMINAL_STREAMING,
.AssociatedInputTerminal = 0x00,
.SourceID = 0x01,
.AssociatedInputTerminal = 0x00,
.SourceID = 0x01,
@@
-155,9
+155,9
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 0,
.TotalEndpoints = 0,
- .Class =
0x01
,
- .SubClass =
0x02
,
- .Protocol =
0x00
,
+ .Class =
AUDIO_CSCP_AudioClass
,
+ .SubClass =
AUDIO_CSCP_AudioStreamingSubclass
,
+ .Protocol =
AUDIO_CSCP_StreamingProtocol
,
.InterfaceStrIndex = NO_DESCRIPTOR
},
.InterfaceStrIndex = NO_DESCRIPTOR
},
@@
-171,17
+171,17
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.TotalEndpoints = 1,
.TotalEndpoints = 1,
- .Class =
0x01
,
- .SubClass =
0x02
,
- .Protocol =
0x00
,
+ .Class =
AUDIO_CSCP_AudioClass
,
+ .SubClass =
AUDIO_CSCP_AudioStreamingSubclass
,
+ .Protocol =
AUDIO_CSCP_StreamingProtocol
,
.InterfaceStrIndex = NO_DESCRIPTOR
},
.Audio_StreamInterface_SPC =
{
.InterfaceStrIndex = NO_DESCRIPTOR
},
.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 = 0x02,
.TerminalLink = 0x02,
@@
-191,25
+191,24
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_AudioFormat =
{
.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 = 0x01,
.SubFrameSize = 0x02,
.BitResolution = 16,
.FormatType = 0x01,
.Channels = 0x01,
.SubFrameSize = 0x02,
.BitResolution = 16,
- .SampleFrequencyType = (sizeof(ConfigurationDescriptor.Audio_AudioFormat.SampleFrequencies) /
- sizeof(Audio_SampleFreq_t)),
+ .SampleFrequencyType = AUDIO_TOTAL_SAMPLE_RATES,
- .SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
+ .SampleFrequencies = {
AUDIO_
SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
},
.Audio_StreamEndpoint =
{
.Endpoint =
{
},
.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_IN | AUDIO_STREAM_EPNUM),
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
.EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | 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 =
{
.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
.LockDelayUnits = 0x00,
.LockDelay = 0x0000