projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB_IsConnected is now cleared before the USB_Disconnect() event is fired in response...
[pub/USBasp.git]
/
Demos
/
Device
/
GenericHID
/
Descriptors.c
diff --git
a/Demos/Device/GenericHID/Descriptors.c
b/Demos/Device/GenericHID/Descriptors.c
index
a14fc50
..
0eed6e9
100644
(file)
--- a/
Demos/Device/GenericHID/Descriptors.c
+++ b/
Demos/Device/GenericHID/Descriptors.c
@@
-134,7
+134,7
@@
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
\r
.HIDSpec = VERSION_BCD(01.11),
\r
.CountryCode = 0x00,
\r
\r
.HIDSpec = VERSION_BCD(01.11),
\r
.CountryCode = 0x00,
\r
- .Total
HIDReports = 0x0
1,
\r
+ .Total
ReportDescriptors =
1,
\r
.HIDReportType = DTYPE_Report,
\r
.HIDReportLength = sizeof(GenericReport)
\r
},
\r
.HIDReportType = DTYPE_Report,
\r
.HIDReportLength = sizeof(GenericReport)
\r
},
\r
@@
-210,37
+210,37
@@
uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
\r
{
\r
case DTYPE_Device:
\r
switch (DescriptorType)
\r
{
\r
case DTYPE_Device:
\r
- Address =
DESCRIPTOR_ADDRESS(DeviceDescriptor)
;
\r
+ Address =
(void*)&DeviceDescriptor
;
\r
Size = sizeof(USB_Descriptor_Device_t);
\r
break;
\r
case DTYPE_Configuration:
\r
Size = sizeof(USB_Descriptor_Device_t);
\r
break;
\r
case DTYPE_Configuration:
\r
- Address =
DESCRIPTOR_ADDRESS(ConfigurationDescriptor)
;
\r
+ Address =
(void*)&ConfigurationDescriptor
;
\r
Size = sizeof(USB_Descriptor_Configuration_t);
\r
break;
\r
case DTYPE_String:
\r
switch (DescriptorNumber)
\r
{
\r
case 0x00:
\r
Size = sizeof(USB_Descriptor_Configuration_t);
\r
break;
\r
case DTYPE_String:
\r
switch (DescriptorNumber)
\r
{
\r
case 0x00:
\r
- Address =
DESCRIPTOR_ADDRESS(LanguageString)
;
\r
+ Address =
(void*)&LanguageString
;
\r
Size = pgm_read_byte(&LanguageString.Header.Size);
\r
break;
\r
case 0x01:
\r
Size = pgm_read_byte(&LanguageString.Header.Size);
\r
break;
\r
case 0x01:
\r
- Address =
DESCRIPTOR_ADDRESS(ManufacturerString)
;
\r
+ Address =
(void*)&ManufacturerString
;
\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);
\r
break;
\r
case 0x02:
\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);
\r
break;
\r
case 0x02:
\r
- Address =
DESCRIPTOR_ADDRESS(ProductString)
;
\r
+ Address =
(void*)&ProductString
;
\r
Size = pgm_read_byte(&ProductString.Header.Size);
\r
break;
\r
}
\r
\r
break;
\r
case DTYPE_HID:
\r
Size = pgm_read_byte(&ProductString.Header.Size);
\r
break;
\r
}
\r
\r
break;
\r
case DTYPE_HID:
\r
- Address =
DESCRIPTOR_ADDRESS(ConfigurationDescriptor.GenericHID)
;
\r
+ Address =
(void*)&ConfigurationDescriptor.GenericHID
;
\r
Size = sizeof(USB_Descriptor_HID_t);
\r
break;
\r
case DTYPE_Report:
\r
Size = sizeof(USB_Descriptor_HID_t);
\r
break;
\r
case DTYPE_Report:
\r
- Address =
DESCRIPTOR_ADDRESS(GenericReport)
;
\r
+ Address =
(void*)&GenericReport
;
\r
Size = sizeof(GenericReport);
\r
break;
\r
}
\r
Size = sizeof(GenericReport);
\r
break;
\r
}
\r