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.
This commit is contained in:
Dean Camera 2009-09-09 13:17:04 +00:00
parent 524decdeb3
commit b221e7d175
63 changed files with 433 additions and 375 deletions

View file

@ -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++)