dlkj/usbd-human-interface-device

Ensure get_descriptor ordering for boot devices

Closed this issue · 0 comments

dlkj commented

See https://www.usb.org/sites/default/files/hid1_11.pdf Appendix F.3

On receipt of a Get_Descriptor request with wValue set to CONFIGURATION, the keyboard shall return the Configuration descriptor, all Interface descriptors, all Endpoint descriptors, and the HID descriptor. It shall not return the HID Report descriptor. The HID descriptor shall be interleaved with the Interface and Endpoint descriptors; that is, the order shall be:

Configuration descriptor (other Interface, Endpoint, and Vendor Specific descriptors if required)
  Interface descriptor (with Subclass and Protocol specifying Boot Keyboard)
    HID descriptor (associated with this Interface)
      Endpoint descriptor (HID Interrupt In Endpoint)
          (other Interface, Endpoint, and Vendor Specific descriptors if required)