USB_UDE_Sample icon indicating copy to clipboard operation
USB_UDE_Sample copied to clipboard

UDEFX2: Convert g_UsbConfigDescriptorSet into a typed struct

Open forderud opened this issue 1 year ago • 1 comments

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.

forderud avatar May 06 '24 10:05 forderud

@xxandy Would it be possible for you to consider this PR?

forderud avatar Jun 06 '24 14:06 forderud