aboutsummaryrefslogtreecommitdiff
path: root/Demos/Device
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2009-05-17 07:44:00 +0000
committerDean Camera <[email protected]>2009-05-17 07:44:00 +0000
commit72c2922e38a2dfd14eb2d8e3692171704b5508f4 (patch)
tree6ab7cdb9e3ee3b56ae05d83f777ec304dd185cc5 /Demos/Device
parenteeba38e343a299e12964aec15fd43108d3dc9130 (diff)
downloadqmk_firmware-72c2922e38a2dfd14eb2d8e3692171704b5508f4.tar.gz
qmk_firmware-72c2922e38a2dfd14eb2d8e3692171704b5508f4.zip
Removed DESCRIPTOR_ADDRESS() macro as it was largely supurflous and only served to obfuscate code.
Diffstat (limited to 'Demos/Device')
-rw-r--r--Demos/Device/AudioInput/Descriptors.c10
-rw-r--r--Demos/Device/AudioOutput/Descriptors.c10
-rw-r--r--Demos/Device/CDC/Descriptors.c14
-rw-r--r--Demos/Device/DualCDC/Descriptors.c10
-rw-r--r--Demos/Device/GenericHID/Descriptors.c14
-rw-r--r--Demos/Device/Joystick/Descriptors.c14
-rw-r--r--Demos/Device/Keyboard/Descriptors.c14
-rw-r--r--Demos/Device/KeyboardMouse/Descriptors.c18
-rw-r--r--Demos/Device/MIDI/Descriptors.c10
-rw-r--r--Demos/Device/MassStorage/Descriptors.c12
-rw-r--r--Demos/Device/MassStorage/MassStorage.c5
-rw-r--r--Demos/Device/Mouse/Descriptors.c14
-rw-r--r--Demos/Device/RNDISEthernet/Descriptors.c10
-rw-r--r--Demos/Device/USBtoSerial/Descriptors.c10
14 files changed, 85 insertions, 80 deletions
diff --git a/Demos/Device/AudioInput/Descriptors.c b/Demos/Device/AudioInput/Descriptors.c
index f15757ef6e..5be5061eba 100644
--- a/Demos/Device/AudioInput/Descriptors.c
+++ b/Demos/Device/AudioInput/Descriptors.c
@@ -282,26 +282,26 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
diff --git a/Demos/Device/AudioOutput/Descriptors.c b/Demos/Device/AudioOutput/Descriptors.c
index ba89b84afd..0c3873b419 100644
--- a/Demos/Device/AudioOutput/Descriptors.c
+++ b/Demos/Device/AudioOutput/Descriptors.c
@@ -282,26 +282,26 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
diff --git a/Demos/Device/CDC/Descriptors.c b/Demos/Device/CDC/Descriptors.c
index c147546f1b..2ec482db1b 100644
--- a/Demos/Device/CDC/Descriptors.c
+++ b/Demos/Device/CDC/Descriptors.c
@@ -225,32 +225,32 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
const uint8_t DescriptorType = (wValue >> 8);
const uint8_t DescriptorNumber = (wValue & 0xFF);
- void* Address = NULL;
- uint16_t Size = NO_DESCRIPTOR;
+ void* Address = NULL;
+ uint16_t Size = NO_DESCRIPTOR;
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
diff --git a/Demos/Device/DualCDC/Descriptors.c b/Demos/Device/DualCDC/Descriptors.c
index b128b4f48d..d9689f76a6 100644
--- a/Demos/Device/DualCDC/Descriptors.c
+++ b/Demos/Device/DualCDC/Descriptors.c
@@ -353,26 +353,26 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
diff --git a/Demos/Device/GenericHID/Descriptors.c b/Demos/Device/GenericHID/Descriptors.c
index 612450ca33..0eed6e9f31 100644
--- a/Demos/Device/GenericHID/Descriptors.c
+++ b/Demos/Device/GenericHID/Descriptors.c
@@ -210,37 +210,37 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
break;
case DTYPE_HID:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.GenericHID);
+ Address = (void*)&ConfigurationDescriptor.GenericHID;
Size = sizeof(USB_Descriptor_HID_t);
break;
case DTYPE_Report:
- Address = DESCRIPTOR_ADDRESS(GenericReport);
+ Address = (void*)&GenericReport;
Size = sizeof(GenericReport);
break;
}
diff --git a/Demos/Device/Joystick/Descriptors.c b/Demos/Device/Joystick/Descriptors.c
index 1bdce1c0d9..7ab6d46d59 100644
--- a/Demos/Device/Joystick/Descriptors.c
+++ b/Demos/Device/Joystick/Descriptors.c
@@ -210,37 +210,37 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
break;
case DTYPE_HID:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.JoystickHID);
+ Address = (void*)&ConfigurationDescriptor.JoystickHID;
Size = sizeof(USB_Descriptor_HID_t);
break;
case DTYPE_Report:
- Address = DESCRIPTOR_ADDRESS(JoystickReport);
+ Address = (void*)&JoystickReport;
Size = sizeof(JoystickReport);
break;
}
diff --git a/Demos/Device/Keyboard/Descriptors.c b/Demos/Device/Keyboard/Descriptors.c
index 02a5b7c385..428a6a1b5f 100644
--- a/Demos/Device/Keyboard/Descriptors.c
+++ b/Demos/Device/Keyboard/Descriptors.c
@@ -227,37 +227,37 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
break;
case DTYPE_HID:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.KeyboardHID);
+ Address = (void*)&ConfigurationDescriptor.KeyboardHID;
Size = sizeof(USB_Descriptor_HID_t);
break;
case DTYPE_Report:
- Address = DESCRIPTOR_ADDRESS(KeyboardReport);
+ Address = (void*)&KeyboardReport;
Size = sizeof(KeyboardReport);
break;
}
diff --git a/Demos/Device/KeyboardMouse/Descriptors.c b/Demos/Device/KeyboardMouse/Descriptors.c
index 2eb2c6e2e3..6a9d75a7f7 100644
--- 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)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
@@ -325,24 +325,24 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
case DTYPE_HID:
if (!(wIndex))
{
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.KeyboardHID);
+ Address = (void*)&ConfigurationDescriptor.KeyboardHID;
Size = sizeof(USB_Descriptor_HID_t);
}
else
{
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.MouseHID);
+ Address = (void*)&ConfigurationDescriptor.MouseHID;
Size = sizeof(USB_Descriptor_HID_t);
}
break;
case DTYPE_Report:
if (!(wIndex))
{
- Address = DESCRIPTOR_ADDRESS(KeyboardReport);
+ Address = (void*)&KeyboardReport;
Size = sizeof(KeyboardReport);
}
else
{
- Address = DESCRIPTOR_ADDRESS(MouseReport);
+ Address = (void*)&MouseReport;
Size = sizeof(MouseReport);
}
diff --git a/Demos/Device/MIDI/Descriptors.c b/Demos/Device/MIDI/Descriptors.c
index 51b54cddb7..d4254110c6 100644
--- a/Demos/Device/MIDI/Descriptors.c
+++ b/Demos/Device/MIDI/Descriptors.c
@@ -293,26 +293,26 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
diff --git a/Demos/Device/MassStorage/Descriptors.c b/Demos/Device/MassStorage/Descriptors.c
index dbb16d1de1..2351a0be21 100644
--- a/Demos/Device/MassStorage/Descriptors.c
+++ b/Demos/Device/MassStorage/Descriptors.c
@@ -187,30 +187,30 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
case 0x03:
- Address = DESCRIPTOR_ADDRESS(SerialNumberString);
+ Address = (void*)&SerialNumberString;
Size = pgm_read_byte(&SerialNumberString.Header.Size);
break;
}
diff --git a/Demos/Device/MassStorage/MassStorage.c b/Demos/Device/MassStorage/MassStorage.c
index c50ca3ddee..1da8930b02 100644
--- a/Demos/Device/MassStorage/MassStorage.c
+++ b/Demos/Device/MassStorage/MassStorage.c
@@ -249,6 +249,11 @@ TASK(USB_MassStorage)
/* Reset the data endpoint banks */
Endpoint_ResetFIFO(MASS_STORAGE_OUT_EPNUM);
Endpoint_ResetFIFO(MASS_STORAGE_IN_EPNUM);
+
+ Endpoint_SelectEndpoint(MASS_STORAGE_OUT_EPNUM);
+ Endpoint_ClearStall();
+ Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
+ Endpoint_ClearStall();
/* Clear the abort transfer flag */
IsMassStoreReset = false;
diff --git a/Demos/Device/Mouse/Descriptors.c b/Demos/Device/Mouse/Descriptors.c
index 1a2b22ab23..0a6cbde369 100644
--- a/Demos/Device/Mouse/Descriptors.c
+++ b/Demos/Device/Mouse/Descriptors.c
@@ -210,37 +210,37 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
break;
case DTYPE_HID:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.MouseHID);
+ Address = (void*)&ConfigurationDescriptor.MouseHID;
Size = sizeof(USB_Descriptor_HID_t);
break;
case DTYPE_Report:
- Address = DESCRIPTOR_ADDRESS(MouseReport);
+ Address = (void*)&MouseReport;
Size = sizeof(MouseReport);
break;
}
diff --git a/Demos/Device/RNDISEthernet/Descriptors.c b/Demos/Device/RNDISEthernet/Descriptors.c
index 93281f1de0..dfa4ba16b3 100644
--- a/Demos/Device/RNDISEthernet/Descriptors.c
+++ b/Demos/Device/RNDISEthernet/Descriptors.c
@@ -231,26 +231,26 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
diff --git a/Demos/Device/USBtoSerial/Descriptors.c b/Demos/Device/USBtoSerial/Descriptors.c
index 26ba2c77b4..d5ab8b754e 100644
--- a/Demos/Device/USBtoSerial/Descriptors.c
+++ b/Demos/Device/USBtoSerial/Descriptors.c
@@ -231,26 +231,26 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
case DTYPE_Device:
- Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
+ Address = (void*)&DeviceDescriptor;
Size = sizeof(USB_Descriptor_Device_t);
break;
case DTYPE_Configuration:
- Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
+ Address = (void*)&ConfigurationDescriptor;
Size = sizeof(USB_Descriptor_Configuration_t);
break;
case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
- Address = DESCRIPTOR_ADDRESS(LanguageString);
+ Address = (void*)&LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
case 0x01:
- Address = DESCRIPTOR_ADDRESS(ManufacturerString);
+ Address = (void*)&ManufacturerString;
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
case 0x02:
- Address = DESCRIPTOR_ADDRESS(ProductString);
+ Address = (void*)&ProductString;
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}