projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed DESCRIPTOR_ADDRESS() macro as it was largely supurflous and only served to...
[pub/USBasp.git]
/
Demos
/
Device
/
KeyboardMouse
/
Descriptors.c
diff --git
a/Demos/Device/KeyboardMouse/Descriptors.c
b/Demos/Device/KeyboardMouse/Descriptors.c
index
2eb2c6e
..
6a9d75a
100644
(file)
--- a/
Demos/Device/KeyboardMouse/Descriptors.c
+++ b/
Demos/Device/KeyboardMouse/Descriptors.c
@@
-297,26
+297,26
@@
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
Size = pgm_read_byte(&ProductString.Header.Size);
\r
break;
\r
}
\r
@@
-325,24
+325,24
@@
uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
case DTYPE_HID:
\r
if (!(wIndex))
\r
{
\r
case DTYPE_HID:
\r
if (!(wIndex))
\r
{
\r
- Address =
DESCRIPTOR_ADDRESS(ConfigurationDescriptor.KeyboardHID)
;
\r
+ Address =
(void*)&ConfigurationDescriptor.KeyboardHID
;
\r
Size = sizeof(USB_Descriptor_HID_t);
\r
}
\r
else
\r
{
\r
Size = sizeof(USB_Descriptor_HID_t);
\r
}
\r
else
\r
{
\r
- Address =
DESCRIPTOR_ADDRESS(ConfigurationDescriptor.MouseHID)
;
\r
+ Address =
(void*)&ConfigurationDescriptor.MouseHID
;
\r
Size = sizeof(USB_Descriptor_HID_t);
\r
}
\r
break;
\r
case DTYPE_Report:
\r
if (!(wIndex))
\r
{
\r
Size = sizeof(USB_Descriptor_HID_t);
\r
}
\r
break;
\r
case DTYPE_Report:
\r
if (!(wIndex))
\r
{
\r
- Address =
DESCRIPTOR_ADDRESS(KeyboardReport)
;
\r
+ Address =
(void*)&KeyboardReport
;
\r
Size = sizeof(KeyboardReport);
\r
}
\r
else
\r
{
\r
Size = sizeof(KeyboardReport);
\r
}
\r
else
\r
{
\r
- Address =
DESCRIPTOR_ADDRESS(MouseReport)
;
\r
+ Address =
(void*)&MouseReport
;
\r
Size = sizeof(MouseReport);
\r
}
\r
\r
Size = sizeof(MouseReport);
\r
}
\r
\r