projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed LowLevel JoystickHostWithParser demo not saving the chosen HID interface's...
[pub/USBasp.git]
/
Projects
/
LEDNotifier
/
Descriptors.c
diff --git
a/Projects/LEDNotifier/Descriptors.c
b/Projects/LEDNotifier/Descriptors.c
index
316ad45
..
38f6e34
100644
(file)
--- a/
Projects/LEDNotifier/Descriptors.c
+++ b/
Projects/LEDNotifier/Descriptors.c
@@
-67,7
+67,7
@@
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
.VendorID = 0x03EB,
.ProductID = 0x2044,
.VendorID = 0x03EB,
.ProductID = 0x2044,
- .ReleaseNumber =
0x0000
,
+ .ReleaseNumber =
VERSION_BCD(00.01)
,
.ManufacturerStrIndex = 0x01,
.ProductStrIndex = 0x02,
.ManufacturerStrIndex = 0x01,
.ProductStrIndex = 0x02,
@@
-114,28
+114,29
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.InterfaceStrIndex = NO_DESCRIPTOR
},
.InterfaceStrIndex = NO_DESCRIPTOR
},
- .CDC_Functional_
Int
Header =
+ .CDC_Functional_Header =
{
{
- .Header = {.Size = sizeof(
CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24
},
- .Sub
Type = 0x00
,
+ .Header = {.Size = sizeof(
USB_CDC_Descriptor_FunctionalHeader_t), .Type = DTYPE_CSInterface
},
+ .Sub
type = CDC_DSUBTYPE_CSInterface_Header
,
- .
Data = {0x01, 0x10}
+ .
CDCSpecification = VERSION_BCD(01.10),
},
},
- .CDC_Functional_A
bstractControlManagement
=
+ .CDC_Functional_A
CM
=
{
{
- .Header = {.Size = sizeof(
CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24
},
- .Sub
Type = 0x02
,
+ .Header = {.Size = sizeof(
USB_CDC_Descriptor_FunctionalACM_t), .Type = DTYPE_CSInterface
},
+ .Sub
type = CDC_DSUBTYPE_CSInterface_ACM
,
- .
Data = {0x06}
+ .
Capabilities = 0x06,
},
.CDC_Functional_Union =
{
},
.CDC_Functional_Union =
{
- .Header = {.Size = sizeof(
CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24
},
- .Sub
Type = 0x06
,
+ .Header = {.Size = sizeof(
USB_CDC_Descriptor_FunctionalUnion_t), .Type = DTYPE_CSInterface
},
+ .Sub
type = CDC_DSUBTYPE_CSInterface_Union
,
- .Data = {0x00, 0x01}
+ .MasterInterfaceNumber = 0,
+ .SlaveInterfaceNumber = 1,
},
.CDC_NotificationEndpoint =
},
.CDC_NotificationEndpoint =
@@
-226,37
+227,37
@@
USB_Descriptor_String_t PROGMEM ProductString =
*/
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
const uint8_t wIndex,
*/
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
const uint8_t wIndex,
- void** const DescriptorAddress)
+
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;
}