projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed EVENT_USB_CDC_ControLineStateChanged() event not taking the CDC interface struc...
[pub/USBasp.git]
/
Demos
/
OTG
/
TestApp
/
Descriptors.c
diff --git
a/Demos/OTG/TestApp/Descriptors.c
b/Demos/OTG/TestApp/Descriptors.c
index
96a0704
..
f8f53cf
100644
(file)
--- a/
Demos/OTG/TestApp/Descriptors.c
+++ b/
Demos/OTG/TestApp/Descriptors.c
@@
-144,7
+144,7
@@
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
\r
* USB host.
\r
*/
\r
* is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
\r
* USB host.
\r
*/
\r
-uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
\r
+uint16_t
CALLBACK_
USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
\r
{
\r
const uint8_t DescriptorType = (wValue >> 8);
\r
const uint8_t DescriptorNumber = (wValue & 0xFF);
\r
{
\r
const uint8_t DescriptorType = (wValue >> 8);
\r
const uint8_t DescriptorNumber = (wValue & 0xFF);
\r
@@
-155,26
+155,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