Removed DESCRIPTOR_ADDRESS() macro as it was largely supurflous and only served to obfuscate code.

This commit is contained in:
Dean Camera 2009-05-17 07:44:00 +00:00
parent eeba38e343
commit 72c2922e38
22 changed files with 115 additions and 110 deletions

View file

@ -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;
}