USB_UDE_Sample
USB_UDE_Sample copied to clipboard
UDEFX2: Convert g_UsbConfigDescriptorSet into a typed struct
Follow-up to #43.
It's safer to work directly with typed data instead of bytes-arrays. Remove associated NT_ASSERT checks that are now redundant, since they are checking obviously correct struct members.
Both USB_CONFIGURATION_DESCRIPTOR and USB_ENDPOINT_DESCRIPTOR have a USHORT member. Two UCHAR entries then need to be combined to form the USHORT member. This needs to be done in a little-endian way so that {0xAB, 0xCD} becomes 0xCDAB.
@xxandy Would it be possible for you to consider this PR?