aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/LowLevel
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-09-09 13:17:04 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-09-09 13:17:04 +0000
commitb221e7d175e4b5ca463fdd6d05b8c3fc71bd7c40 (patch)
tree8a546e950f53d4ab3457ec0e238b46d3f0e9c417 /LUFA/Drivers/USB/LowLevel
parent524decdeb3a0a4c7adbeb4af906556e7bc6dd77c (diff)
downloadlufa-b221e7d175e4b5ca463fdd6d05b8c3fc71bd7c40.tar.gz
lufa-b221e7d175e4b5ca463fdd6d05b8c3fc71bd7c40.tar.bz2
lufa-b221e7d175e4b5ca463fdd6d05b8c3fc71bd7c40.zip
Remove USE_NONSTANDARD_DESCRIPTOR_NAMES compile time token, split out standard descriptors into seperate USB_Descriptor_* and USB_StdDescriptor_* structures so that both can be used within the one project.
Add guard to the HID Host Class driver SetProtocol command, to ensure that the device supports boot protocol mode before issuing the request.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel')
-rw-r--r--LUFA/Drivers/USB/LowLevel/DevChapter9.c11
-rw-r--r--LUFA/Drivers/USB/LowLevel/Host.c4
2 files changed, 3 insertions, 12 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.c b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
index fa35a1b61..50afb61be 100644
--- a/LUFA/Drivers/USB/LowLevel/DevChapter9.c
+++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
@@ -232,14 +232,9 @@ static void USB_Device_GetInternalSerialDescriptor(void)
int16_t UnicodeString[20];
} SignatureDescriptor;
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)
- SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);
- SignatureDescriptor.Header.Type = DTYPE_String;
- #else
- SignatureDescriptor.Header.bLength = sizeof(SignatureDescriptor);
- SignatureDescriptor.Header.bDescriptorType = DTYPE_String;
- #endif
-
+ SignatureDescriptor.Header.Size = sizeof(SignatureDescriptor);
+ SignatureDescriptor.Header.Type = DTYPE_String;
+
uint8_t SigReadAddress = 0x0E;
for (uint8_t SerialCharNum = 0; SerialCharNum < 20; SerialCharNum++)
diff --git a/LUFA/Drivers/USB/LowLevel/Host.c b/LUFA/Drivers/USB/LowLevel/Host.c
index 8a51ae5bf..2685f5f0b 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.c
+++ b/LUFA/Drivers/USB/LowLevel/Host.c
@@ -137,11 +137,7 @@ void USB_Host_ProcessNextHostState(void)
break;
}
- #if defined(USE_NONSTANDARD_DESCRIPTOR_NAMES)
USB_ControlPipeSize = DataBuffer[offsetof(USB_Descriptor_Device_t, Endpoint0Size)];
- #else
- USB_ControlPipeSize = DataBuffer[offsetof(USB_Descriptor_Device_t, bMaxPacketSize0)];
- #endif
USB_Host_ResetDevice();