unsigned char USBGetDescriptorRequest_GetDescriptorType(const USBGenericRequest *request) { // Requested descriptor type is in the high-byte of the wValue field return (USBGenericRequest_GetValue(request) >> 8) & 0xFF; }