projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor documentation enhancements.
[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
414c766
..
150fb33
100644
(file)
--- a/
Demos/Device/LowLevel/AudioInput/Descriptors.c
+++ b/
Demos/Device/LowLevel/AudioInput/Descriptors.c
@@
-46,7
+46,7
@@
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(0
2.0
0),
+ .USBSpecification = VERSION_BCD(0
1.1
0),
.Class = 0x00,
.SubClass = 0x00,
.Protocol = 0x00,
.Class = 0x00,
.SubClass = 0x00,
.Protocol = 0x00,
@@
-55,7
+55,7
@@
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.VendorID = 0x03EB,
.ProductID = 0x2047,
.VendorID = 0x03EB,
.ProductID = 0x2047,
- .ReleaseNumber =
0x0000
,
+ .ReleaseNumber =
VERSION_BCD(00.01)
,
.ManufacturerStrIndex = 0x01,
.ProductStrIndex = 0x02,
.ManufacturerStrIndex = 0x01,
.ProductStrIndex = 0x02,
@@
-104,8
+104,8
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_ControlInterface_SPC =
{
.Audio_ControlInterface_SPC =
{
- .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_
Audio
Interface},
- .Subtype = DSUBTYPE_Header,
+ .Header = {.Size = sizeof(USB_Audio_Interface_AC_t), .Type = DTYPE_
CS
Interface},
+ .Subtype = DSUBTYPE_
Audio
Header,
.ACSpecification = VERSION_BCD(01.00),
.TotalLength = (sizeof(USB_Audio_Interface_AC_t) +
.ACSpecification = VERSION_BCD(01.00),
.TotalLength = (sizeof(USB_Audio_Interface_AC_t) +
@@
-118,7
+118,7
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_InputTerminal =
{
.Audio_InputTerminal =
{
- .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_
Audio
Interface},
+ .Header = {.Size = sizeof(USB_Audio_InputTerminal_t), .Type = DTYPE_
CS
Interface},
.Subtype = DSUBTYPE_InputTerminal,
.TerminalID = 0x01,
.Subtype = DSUBTYPE_InputTerminal,
.TerminalID = 0x01,
@@
-134,7
+134,7
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_OutputTerminal =
{
.Audio_OutputTerminal =
{
- .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_
Audio
Interface},
+ .Header = {.Size = sizeof(USB_Audio_OutputTerminal_t), .Type = DTYPE_
CS
Interface},
.Subtype = DSUBTYPE_OutputTerminal,
.TerminalID = 0x02,
.Subtype = DSUBTYPE_OutputTerminal,
.TerminalID = 0x02,
@@
-180,7
+180,7
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_StreamInterface_SPC =
{
.Audio_StreamInterface_SPC =
{
- .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_
Audio
Interface},
+ .Header = {.Size = sizeof(USB_Audio_Interface_AS_t), .Type = DTYPE_
CS
Interface},
.Subtype = DSUBTYPE_General,
.TerminalLink = 0x02,
.Subtype = DSUBTYPE_General,
.TerminalLink = 0x02,
@@
-191,7
+191,7
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_AudioFormat =
{
.Audio_AudioFormat =
{
- .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_
Audio
Interface},
+ .Header = {.Size = sizeof(USB_Audio_Format_t), .Type = DTYPE_
CS
Interface},
.Subtype = DSUBTYPE_Format,
.FormatType = 0x01,
.Subtype = DSUBTYPE_Format,
.FormatType = 0x01,
@@
-223,10
+223,10
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.Audio_StreamEndpoint_SPC =
{
.Audio_StreamEndpoint_SPC =
{
- .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_
Audio
Endpoint},
+ .Header = {.Size = sizeof(USB_Audio_StreamEndpoint_Spc_t), .Type = DTYPE_
CS
Endpoint},
.Subtype = DSUBTYPE_General,
.Subtype = DSUBTYPE_General,
- .Attributes =
0x00
,
+ .Attributes =
EP_ACCEPTS_SMALL_PACKETS
,
.LockDelayUnits = 0x00,
.LockDelay = 0x0000
.LockDelayUnits = 0x00,
.LockDelay = 0x0000
@@
-272,37
+272,39
@@
USB_Descriptor_String_t PROGMEM ProductString =
* is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
* USB host.
*/
* is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
* USB host.
*/
-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,
+ const void** const DescriptorAddress)
{
const uint8_t DescriptorType = (wValue >> 8);
const uint8_t DescriptorNumber = (wValue & 0xFF);
{
const uint8_t DescriptorType = (wValue >> 8);
const uint8_t DescriptorNumber = (wValue & 0xFF);
-
void*
Address = NULL;
- uint16_t Size = NO_DESCRIPTOR;
+
const void*
Address = NULL;
+ uint16_t
Size = NO_DESCRIPTOR;
switch (DescriptorType)
{
case DTYPE_Device:
switch (DescriptorType)
{
case DTYPE_Device:
- Address =
(void*)
&DeviceDescriptor;
+ Address = &DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address =
(void*)
&ConfigurationDescriptor;
+ Address = &ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address =
(void*)
&LanguageString;
+ Address = &LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address =
(void*)
&ManufacturerString;
+ Address = &ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address =
(void*)
&ProductString;
+ Address = &ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}