Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
b2330934
Commit
b2330934
authored
Jun 11, 2009
by
Dean Camera
Browse files
Some minor whitespace corrections.
parent
462fb500
Changes
24
Hide whitespace changes
Inline
Side-by-side
Demos/Device/ClassDriver/AudioInput/AudioInput.h
View file @
b2330934
...
@@ -42,18 +42,18 @@
...
@@ -42,18 +42,18 @@
#include <avr/power.h>
#include <avr/power.h>
#include "Descriptors.h"
#include "Descriptors.h"
#include <LUFA/Version.h>
#include <LUFA/Version.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Board/Joystick.h>
#include <LUFA/Drivers/Board/Joystick.h>
#include <LUFA/Drivers/Peripheral/ADC.h>
#include <LUFA/Drivers/Peripheral/ADC.h>
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/USB/Class/Device/Audio.h>
#include <LUFA/Drivers/USB/Class/Device/Audio.h>
/* Macros: */
/* Macros: */
/** ADC channel number for the microphone input. */
/** ADC channel number for the microphone input. */
#define MIC_IN_ADC_CHANNEL 2
#define MIC_IN_ADC_CHANNEL 2
/** Maximum ADC sample value for the microphone input. */
/** Maximum ADC sample value for the microphone input. */
#define SAMPLE_MAX_RANGE 0xFFFF
#define SAMPLE_MAX_RANGE 0xFFFF
...
@@ -71,11 +71,11 @@
...
@@ -71,11 +71,11 @@
/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
/* Function Prototypes: */
/* Function Prototypes: */
void
SetupHardware
(
void
);
void
SetupHardware
(
void
);
void
ProcessNextSample
(
void
);
void
ProcessNextSample
(
void
);
void
EVENT_USB_Connect
(
void
);
void
EVENT_USB_Connect
(
void
);
void
EVENT_USB_Disconnect
(
void
);
void
EVENT_USB_Disconnect
(
void
);
void
EVENT_USB_ConfigurationChanged
(
void
);
void
EVENT_USB_ConfigurationChanged
(
void
);
...
...
Demos/Device/ClassDriver/AudioInput/Descriptors.c
View file @
b2330934
...
@@ -45,22 +45,22 @@
...
@@ -45,22 +45,22 @@
USB_Descriptor_Device_t
PROGMEM
DeviceDescriptor
=
USB_Descriptor_Device_t
PROGMEM
DeviceDescriptor
=
{
{
.
Header
=
{.
Size
=
sizeof
(
USB_Descriptor_Device_t
),
.
Type
=
DTYPE_Device
},
.
Header
=
{.
Size
=
sizeof
(
USB_Descriptor_Device_t
),
.
Type
=
DTYPE_Device
},
.
USBSpecification
=
VERSION_BCD
(
02
.
00
),
.
USBSpecification
=
VERSION_BCD
(
02
.
00
),
.
Class
=
0x00
,
.
Class
=
0x00
,
.
SubClass
=
0x00
,
.
SubClass
=
0x00
,
.
Protocol
=
0x00
,
.
Protocol
=
0x00
,
.
Endpoint0Size
=
FIXED_CONTROL_ENDPOINT_SIZE
,
.
Endpoint0Size
=
FIXED_CONTROL_ENDPOINT_SIZE
,
.
VendorID
=
0x03EB
,
.
VendorID
=
0x03EB
,
.
ProductID
=
0x2047
,
.
ProductID
=
0x2047
,
.
ReleaseNumber
=
0x0000
,
.
ReleaseNumber
=
0x0000
,
.
ManufacturerStrIndex
=
0x01
,
.
ManufacturerStrIndex
=
0x01
,
.
ProductStrIndex
=
0x02
,
.
ProductStrIndex
=
0x02
,
.
SerialNumStrIndex
=
NO_DESCRIPTOR
,
.
SerialNumStrIndex
=
NO_DESCRIPTOR
,
.
NumberOfConfigurations
=
1
.
NumberOfConfigurations
=
1
};
};
...
@@ -80,12 +80,12 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -80,12 +80,12 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
ConfigurationNumber
=
1
,
.
ConfigurationNumber
=
1
,
.
ConfigurationStrIndex
=
NO_DESCRIPTOR
,
.
ConfigurationStrIndex
=
NO_DESCRIPTOR
,
.
ConfigAttributes
=
(
USB_CONFIG_ATTR_BUSPOWERED
|
USB_CONFIG_ATTR_SELFPOWERED
),
.
ConfigAttributes
=
(
USB_CONFIG_ATTR_BUSPOWERED
|
USB_CONFIG_ATTR_SELFPOWERED
),
.
MaxPowerConsumption
=
USB_CONFIG_POWER_MA
(
100
)
.
MaxPowerConsumption
=
USB_CONFIG_POWER_MA
(
100
)
},
},
.
AudioControlInterface
=
.
AudioControlInterface
=
{
{
.
Header
=
{.
Size
=
sizeof
(
USB_Descriptor_Interface_t
),
.
Type
=
DTYPE_Interface
},
.
Header
=
{.
Size
=
sizeof
(
USB_Descriptor_Interface_t
),
.
Type
=
DTYPE_Interface
},
...
@@ -94,40 +94,40 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -94,40 +94,40 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
AlternateSetting
=
0
,
.
AlternateSetting
=
0
,
.
TotalEndpoints
=
0
,
.
TotalEndpoints
=
0
,
.
Class
=
0x01
,
.
Class
=
0x01
,
.
SubClass
=
0x01
,
.
SubClass
=
0x01
,
.
Protocol
=
0x00
,
.
Protocol
=
0x00
,
.
InterfaceStrIndex
=
NO_DESCRIPTOR
.
InterfaceStrIndex
=
NO_DESCRIPTOR
},
},
.
AudioControlInterface_SPC
=
.
AudioControlInterface_SPC
=
{
{
.
Header
=
{.
Size
=
sizeof
(
USB_AudioInterface_AC_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_AudioInterface_AC_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_Header
,
.
Subtype
=
DSUBTYPE_Header
,
.
ACSpecification
=
VERSION_BCD
(
01
.
00
),
.
ACSpecification
=
VERSION_BCD
(
01
.
00
),
.
TotalLength
=
(
sizeof
(
USB_AudioInterface_AC_t
)
+
.
TotalLength
=
(
sizeof
(
USB_AudioInterface_AC_t
)
+
sizeof
(
USB_AudioInputTerminal_t
)
+
sizeof
(
USB_AudioInputTerminal_t
)
+
sizeof
(
USB_AudioOutputTerminal_t
)),
sizeof
(
USB_AudioOutputTerminal_t
)),
.
InCollection
=
1
,
.
InCollection
=
1
,
.
InterfaceNumbers
=
{
1
},
.
InterfaceNumbers
=
{
1
},
},
},
.
InputTerminal
=
.
InputTerminal
=
{
{
.
Header
=
{.
Size
=
sizeof
(
USB_AudioInputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_AudioInputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_InputTerminal
,
.
Subtype
=
DSUBTYPE_InputTerminal
,
.
TerminalID
=
0x01
,
.
TerminalID
=
0x01
,
.
TerminalType
=
TERMINAL_IN_MIC
,
.
TerminalType
=
TERMINAL_IN_MIC
,
.
AssociatedOutputTerminal
=
0x00
,
.
AssociatedOutputTerminal
=
0x00
,
.
TotalChannels
=
1
,
.
TotalChannels
=
1
,
.
ChannelConfig
=
0
,
.
ChannelConfig
=
0
,
.
ChannelStrIndex
=
NO_DESCRIPTOR
,
.
ChannelStrIndex
=
NO_DESCRIPTOR
,
.
TerminalStrIndex
=
NO_DESCRIPTOR
.
TerminalStrIndex
=
NO_DESCRIPTOR
},
},
...
@@ -136,14 +136,14 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -136,14 +136,14 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
{
.
Header
=
{.
Size
=
sizeof
(
USB_AudioOutputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_AudioOutputTerminal_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_OutputTerminal
,
.
Subtype
=
DSUBTYPE_OutputTerminal
,
.
TerminalID
=
0x02
,
.
TerminalID
=
0x02
,
.
TerminalType
=
TERMINAL_STREAMING
,
.
TerminalType
=
TERMINAL_STREAMING
,
.
AssociatedInputTerminal
=
0x00
,
.
AssociatedInputTerminal
=
0x00
,
.
SourceID
=
0x01
,
.
SourceID
=
0x01
,
.
TerminalStrIndex
=
NO_DESCRIPTOR
.
TerminalStrIndex
=
NO_DESCRIPTOR
},
},
.
AudioStreamInterface_Alt0
=
.
AudioStreamInterface_Alt0
=
...
@@ -152,13 +152,13 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -152,13 +152,13 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
InterfaceNumber
=
1
,
.
InterfaceNumber
=
1
,
.
AlternateSetting
=
0
,
.
AlternateSetting
=
0
,
.
TotalEndpoints
=
0
,
.
TotalEndpoints
=
0
,
.
Class
=
0x01
,
.
Class
=
0x01
,
.
SubClass
=
0x02
,
.
SubClass
=
0x02
,
.
Protocol
=
0x00
,
.
Protocol
=
0x00
,
.
InterfaceStrIndex
=
NO_DESCRIPTOR
.
InterfaceStrIndex
=
NO_DESCRIPTOR
},
},
...
@@ -168,27 +168,27 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -168,27 +168,27 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
InterfaceNumber
=
1
,
.
InterfaceNumber
=
1
,
.
AlternateSetting
=
1
,
.
AlternateSetting
=
1
,
.
TotalEndpoints
=
1
,
.
TotalEndpoints
=
1
,
.
Class
=
0x01
,
.
Class
=
0x01
,
.
SubClass
=
0x02
,
.
SubClass
=
0x02
,
.
Protocol
=
0x00
,
.
Protocol
=
0x00
,
.
InterfaceStrIndex
=
NO_DESCRIPTOR
.
InterfaceStrIndex
=
NO_DESCRIPTOR
},
},
.
AudioStreamInterface_SPC
=
.
AudioStreamInterface_SPC
=
{
{
.
Header
=
{.
Size
=
sizeof
(
USB_AudioInterface_AS_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_AudioInterface_AS_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Subtype
=
DSUBTYPE_General
,
.
Subtype
=
DSUBTYPE_General
,
.
TerminalLink
=
0x02
,
.
TerminalLink
=
0x02
,
.
FrameDelay
=
1
,
.
FrameDelay
=
1
,
.
AudioFormat
=
0x0001
.
AudioFormat
=
0x0001
},
},
.
AudioFormat
=
.
AudioFormat
=
{
{
.
Header
=
{.
Size
=
sizeof
(
USB_AudioFormat_t
),
.
Type
=
DTYPE_AudioInterface
},
.
Header
=
{.
Size
=
sizeof
(
USB_AudioFormat_t
),
.
Type
=
DTYPE_AudioInterface
},
...
@@ -239,7 +239,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -239,7 +239,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
USB_Descriptor_String_t
PROGMEM
LanguageString
=
USB_Descriptor_String_t
PROGMEM
LanguageString
=
{
{
.
Header
=
{.
Size
=
USB_STRING_LEN
(
1
),
.
Type
=
DTYPE_String
},
.
Header
=
{.
Size
=
USB_STRING_LEN
(
1
),
.
Type
=
DTYPE_String
},
.
UnicodeString
=
{
LANGUAGE_ID_ENG
}
.
UnicodeString
=
{
LANGUAGE_ID_ENG
}
};
};
...
@@ -250,7 +250,7 @@ USB_Descriptor_String_t PROGMEM LanguageString =
...
@@ -250,7 +250,7 @@ USB_Descriptor_String_t PROGMEM LanguageString =
USB_Descriptor_String_t
PROGMEM
ManufacturerString
=
USB_Descriptor_String_t
PROGMEM
ManufacturerString
=
{
{
.
Header
=
{.
Size
=
USB_STRING_LEN
(
11
),
.
Type
=
DTYPE_String
},
.
Header
=
{.
Size
=
USB_STRING_LEN
(
11
),
.
Type
=
DTYPE_String
},
.
UnicodeString
=
L"Dean Camera"
.
UnicodeString
=
L"Dean Camera"
};
};
...
@@ -261,7 +261,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
...
@@ -261,7 +261,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
USB_Descriptor_String_t
PROGMEM
ProductString
=
USB_Descriptor_String_t
PROGMEM
ProductString
=
{
{
.
Header
=
{.
Size
=
USB_STRING_LEN
(
18
),
.
Type
=
DTYPE_String
},
.
Header
=
{.
Size
=
USB_STRING_LEN
(
18
),
.
Type
=
DTYPE_String
},
.
UnicodeString
=
L"LUFA Audio In Demo"
.
UnicodeString
=
L"LUFA Audio In Demo"
};
};
...
...
Demos/Device/ClassDriver/AudioInput/Descriptors.h
View file @
b2330934
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
/** Endpoint number of the Audio isochronous streaming data endpoint. */
/** Endpoint number of the Audio isochronous streaming data endpoint. */
#define AUDIO_STREAM_EPNUM 1
#define AUDIO_STREAM_EPNUM 1
#else
#else
#define AUDIO_STREAM_EPNUM 3
#define AUDIO_STREAM_EPNUM 3
#endif
#endif
/** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires
/** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires
...
@@ -55,10 +55,10 @@
...
@@ -55,10 +55,10 @@
* USB AVR models will result in unavoidable distorted output.
* USB AVR models will result in unavoidable distorted output.
*/
*/
#define AUDIO_STREAM_EPSIZE ENDPOINT_MAX_SIZE(AUDIO_STREAM_EPNUM)
#define AUDIO_STREAM_EPSIZE ENDPOINT_MAX_SIZE(AUDIO_STREAM_EPNUM)
/** Sample frequency of the data being transmitted through the streaming endpoint. */
/** Sample frequency of the data being transmitted through the streaming endpoint. */
#define AUDIO_SAMPLE_FREQUENCY 48000
#define AUDIO_SAMPLE_FREQUENCY 48000
/* Type Defines: */
/* Type Defines: */
/** Type define for the device configuration descriptor structure. This must be defined in the
/** Type define for the device configuration descriptor structure. This must be defined in the
* application code, as the configuration descriptor contains several sub-descriptors which
* application code, as the configuration descriptor contains several sub-descriptors which
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
USB_AudioStreamEndpoint_Std_t
AudioEndpoint
;
USB_AudioStreamEndpoint_Std_t
AudioEndpoint
;
USB_AudioStreamEndpoint_Spc_t
AudioEndpoint_SPC
;
USB_AudioStreamEndpoint_Spc_t
AudioEndpoint_SPC
;
}
USB_Descriptor_Configuration_t
;
}
USB_Descriptor_Configuration_t
;
/* Function Prototypes: */
/* Function Prototypes: */
uint16_t
CALLBACK_USB_GetDescriptor
(
const
uint16_t
wValue
,
const
uint8_t
wIndex
,
void
**
const
DescriptorAddress
)
uint16_t
CALLBACK_USB_GetDescriptor
(
const
uint16_t
wValue
,
const
uint8_t
wIndex
,
void
**
const
DescriptorAddress
)
ATTR_WARN_UNUSED_RESULT
ATTR_NON_NULL_PTR_ARG
(
3
);
ATTR_WARN_UNUSED_RESULT
ATTR_NON_NULL_PTR_ARG
(
3
);
...
...
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
View file @
b2330934
...
@@ -99,7 +99,7 @@ void ProcessNextSample(void)
...
@@ -99,7 +99,7 @@ void ProcessNextSample(void)
/* Massage signed 16-bit left and right audio samples into signed 8-bit */
/* Massage signed 16-bit left and right audio samples into signed 8-bit */
int8_t
LeftSample_8Bit
=
(
LeftSample_16Bit
>>
8
);
int8_t
LeftSample_8Bit
=
(
LeftSample_16Bit
>>
8
);
int8_t
RightSample_8Bit
=
(
RightSample_16Bit
>>
8
);
int8_t
RightSample_8Bit
=
(
RightSample_16Bit
>>
8
);
/* Mix the two channels together to produce a mono, 8-bit sample */
/* Mix the two channels together to produce a mono, 8-bit sample */
int8_t
MixedSample_8Bit
=
(((
int16_t
)
LeftSample_8Bit
+
(
int16_t
)
RightSample_8Bit
)
>>
1
);
int8_t
MixedSample_8Bit
=
(((
int16_t
)
LeftSample_8Bit
+
(
int16_t
)
RightSample_8Bit
)
>>
1
);
...
@@ -160,9 +160,9 @@ void EVENT_USB_Connect(void)
...
@@ -160,9 +160,9 @@ void EVENT_USB_Connect(void)
#if (defined(AUDIO_OUT_MONO) || defined(AUDIO_OUT_STEREO))
#if (defined(AUDIO_OUT_MONO) || defined(AUDIO_OUT_STEREO))
/* PWM speaker timer initialization */
/* PWM speaker timer initialization */
TCCRxA
=
((
1
<<
WGMx0
)
|
(
1
<<
COMxA1
)
|
(
1
<<
COMxA0
)
TCCRxA
=
((
1
<<
WGMx0
)
|
(
1
<<
COMxA1
)
|
(
1
<<
COMxA0
)
|
(
1
<<
COMxB1
)
|
(
1
<<
COMxB0
));
// Set on match, clear on TOP
|
(
1
<<
COMxB1
)
|
(
1
<<
COMxB0
));
// Set on match, clear on TOP
TCCRxB
=
((
1
<<
WGMx2
)
|
(
1
<<
CSx0
));
// Fast 8-Bit PWM, Fcpu speed
TCCRxB
=
((
1
<<
WGMx2
)
|
(
1
<<
CSx0
));
// Fast 8-Bit PWM, Fcpu speed
#endif
#endif
}
}
/** Event handler for the library USB Disconnection event. */
/** Event handler for the library USB Disconnection event. */
...
@@ -176,7 +176,7 @@ void EVENT_USB_Disconnect(void)
...
@@ -176,7 +176,7 @@ void EVENT_USB_Disconnect(void)
#if (defined(AUDIO_OUT_MONO) || defined(AUDIO_OUT_STEREO))
#if (defined(AUDIO_OUT_MONO) || defined(AUDIO_OUT_STEREO))
/* Stop the PWM generation timer */
/* Stop the PWM generation timer */
TCCRxB
=
0
;
TCCRxB
=
0
;
#endif
#endif
#if defined(AUDIO_OUT_MONO)
#if defined(AUDIO_OUT_MONO)
/* Set speaker as input to reduce current draw */
/* Set speaker as input to reduce current draw */
...
...
Demos/Device/ClassDriver/AudioOutput/Descriptors.c
View file @
b2330934
...
@@ -45,22 +45,22 @@
...
@@ -45,22 +45,22 @@
USB_Descriptor_Device_t
PROGMEM
DeviceDescriptor
=
USB_Descriptor_Device_t
PROGMEM
DeviceDescriptor
=
{
{
.
Header
=
{.
Size
=
sizeof
(
USB_Descriptor_Device_t
),
.
Type
=
DTYPE_Device
},
.
Header
=
{.
Size
=
sizeof
(
USB_Descriptor_Device_t
),
.
Type
=
DTYPE_Device
},
.
USBSpecification
=
VERSION_BCD
(
02
.
00
),
.
USBSpecification
=
VERSION_BCD
(
02
.
00
),
.
Class
=
0x00
,
.
Class
=
0x00
,
.
SubClass
=
0x00
,
.
SubClass
=
0x00
,
.
Protocol
=
0x00
,
.
Protocol
=
0x00
,
.
Endpoint0Size
=
FIXED_CONTROL_ENDPOINT_SIZE
,
.
Endpoint0Size
=
FIXED_CONTROL_ENDPOINT_SIZE
,
.
VendorID
=
0x03EB
,
.
VendorID
=
0x03EB
,
.
ProductID
=
0x2046
,
.
ProductID
=
0x2046
,
.
ReleaseNumber
=
0x0000
,
.
ReleaseNumber
=
0x0000
,
.
ManufacturerStrIndex
=
0x01
,
.
ManufacturerStrIndex
=
0x01
,
.
ProductStrIndex
=
0x02
,
.
ProductStrIndex
=
0x02
,
.
SerialNumStrIndex
=
NO_DESCRIPTOR
,
.
SerialNumStrIndex
=
NO_DESCRIPTOR
,
.
NumberOfConfigurations
=
1
.
NumberOfConfigurations
=
1
};
};
...
@@ -80,7 +80,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -80,7 +80,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
ConfigurationNumber
=
1
,
.
ConfigurationNumber
=
1
,
.
ConfigurationStrIndex
=
NO_DESCRIPTOR
,
.
ConfigurationStrIndex
=
NO_DESCRIPTOR
,
.
ConfigAttributes
=
(
USB_CONFIG_ATTR_BUSPOWERED
|
USB_CONFIG_ATTR_SELFPOWERED
),
.
ConfigAttributes
=
(
USB_CONFIG_ATTR_BUSPOWERED
|
USB_CONFIG_ATTR_SELFPOWERED
),
.
MaxPowerConsumption
=
USB_CONFIG_POWER_MA
(
100
)
.
MaxPowerConsumption
=
USB_CONFIG_POWER_MA
(
100
)
...
@@ -94,12 +94,12 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -94,12 +94,12 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
AlternateSetting
=
0
,
.
AlternateSetting
=
0
,
.
TotalEndpoints
=
0
,
.
TotalEndpoints
=
0
,
.
Class
=
0x01
,
.
Class
=
0x01
,
.
SubClass
=
0x01
,
.
SubClass
=
0x01
,
.
Protocol
=
0x00
,
.
Protocol
=
0x00
,
.
InterfaceStrIndex
=
NO_DESCRIPTOR
.
InterfaceStrIndex
=
NO_DESCRIPTOR
},
},
.
AudioControlInterface_SPC
=
.
AudioControlInterface_SPC
=
...
@@ -109,11 +109,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -109,11 +109,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
ACSpecification
=
VERSION_BCD
(
01
.
00
),
.
ACSpecification
=
VERSION_BCD
(
01
.
00
),
.
TotalLength
=
(
sizeof
(
USB_AudioInterface_AC_t
)
+
.
TotalLength
=
(
sizeof
(
USB_AudioInterface_AC_t
)
+
sizeof
(
USB_AudioInputTerminal_t
)
+
sizeof
(
USB_AudioInputTerminal_t
)
+
sizeof
(
USB_AudioOutputTerminal_t
)),
sizeof
(
USB_AudioOutputTerminal_t
)),
.
InCollection
=
1
,
.
InCollection
=
1
,
.
InterfaceNumbers
=
{
1
},
.
InterfaceNumbers
=
{
1
},
},
},
.
InputTerminal
=
.
InputTerminal
=
...
@@ -143,7 +143,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -143,7 +143,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
SourceID
=
0x01
,
.
SourceID
=
0x01
,
.
TerminalStrIndex
=
NO_DESCRIPTOR
.
TerminalStrIndex
=
NO_DESCRIPTOR
},
},
.
AudioStreamInterface_Alt0
=
.
AudioStreamInterface_Alt0
=
...
@@ -154,11 +154,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -154,11 +154,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
AlternateSetting
=
0
,
.
AlternateSetting
=
0
,
.
TotalEndpoints
=
0
,
.
TotalEndpoints
=
0
,
.
Class
=
0x01
,
.
Class
=
0x01
,
.
SubClass
=
0x02
,
.
SubClass
=
0x02
,
.
Protocol
=
0x00
,
.
Protocol
=
0x00
,
.
InterfaceStrIndex
=
NO_DESCRIPTOR
.
InterfaceStrIndex
=
NO_DESCRIPTOR
},
},
...
@@ -170,11 +170,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -170,11 +170,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.
AlternateSetting
=
1
,
.
AlternateSetting
=
1
,
.
TotalEndpoints
=
1
,
.
TotalEndpoints
=
1
,
.
Class
=
0x01
,
.
Class
=
0x01
,
.
SubClass
=
0x02
,
.
SubClass
=
0x02
,
.
Protocol
=
0x00
,
.
Protocol
=
0x00
,
.
InterfaceStrIndex
=
NO_DESCRIPTOR
.
InterfaceStrIndex
=
NO_DESCRIPTOR
},
},
...
@@ -239,7 +239,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
...
@@ -239,7 +239,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
USB_Descriptor_String_t
PROGMEM
LanguageString
=
USB_Descriptor_String_t
PROGMEM
LanguageString
=
{
{
.
Header
=
{.
Size
=
USB_STRING_LEN
(
1
),
.
Type
=
DTYPE_String
},
.
Header
=
{.
Size
=
USB_STRING_LEN
(
1
),
.
Type
=
DTYPE_String
},
.
UnicodeString
=
{
LANGUAGE_ID_ENG
}
.
UnicodeString
=
{
LANGUAGE_ID_ENG
}
};
};
...
@@ -250,7 +250,7 @@ USB_Descriptor_String_t PROGMEM LanguageString =
...
@@ -250,7 +250,7 @@ USB_Descriptor_String_t PROGMEM LanguageString =
USB_Descriptor_String_t
PROGMEM
ManufacturerString
=
USB_Descriptor_String_t
PROGMEM
ManufacturerString
=
{
{
.
Header
=
{.
Size
=
USB_STRING_LEN
(
11
),
.
Type
=
DTYPE_String
},
.
Header
=
{.
Size
=
USB_STRING_LEN
(
11
),
.
Type
=
DTYPE_String
},
.
UnicodeString
=
L"Dean Camera"
.
UnicodeString
=
L"Dean Camera"
};
};
...
@@ -261,7 +261,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
...
@@ -261,7 +261,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
USB_Descriptor_String_t
PROGMEM
ProductString
=
USB_Descriptor_String_t
PROGMEM
ProductString
=
{
{
.
Header
=
{.
Size
=
USB_STRING_LEN
(
19
),
.
Type
=
DTYPE_String
},
.
Header
=
{.
Size
=
USB_STRING_LEN
(
19
),
.
Type
=
DTYPE_String
},
.
UnicodeString
=
L"LUFA Audio Out Demo"