While working with the usbd library I noticed some descriptors (eg. Configuration and Endpoint) have the wrong bLength
value set. It appears the length is set to the actual length + 1. After some investigation I found that the
Configuration and Endpoint descriptor definitions (usbd_configuration_descriptor_t and usbd_endpoint_descriptor_t)
appear to not be packed properly. Doing a sizeof() on each of these structures returns the same size as specified in
the bLength field.
So, my question is, is this intentional? Or is this a packing issue with the usbd library? Both structures appear to be
aligned on a 16 bit boundary when they should be aligned on an 8 bit boundary. I have worked around this but it may be
worth noting in the documentation or fixing it.
BTW: I ran into this issue while porting the libusb library to Neutrino, libusb expects the descriptors to be in bus
format and size.