This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

about the hid report descriptor

Hi,everyone
Does the report dexcriptor support negative value.i have checked the keil usb demo of hitex board,the report descriptor is declared as unsigned char.
one more question,in the get_descriptor function,
case USB_CONFIGURATION_DESCRIPTOR_TYPE: pD = (BYTE *)USB_ConfigDescriptor; for (n = 0; n != SetupPacket.wValue.WB.L; n++) { if (((USB_CONFIGURATION_DESCRIPTOR *)pD)->bLength != 0) { pD += ((USB_CONFIGURATION_DESCRIPTOR *)pD)->wTotalLength; } }
what is the wValue.WB.L in the configDescriptor indicate?Why here use the wTotalLength.Thanks!

Parents
  • No, you are wrong. The original code is correct.

    USB Manual says the following:
    bLength - Size of descriptor
    wTotalLength - Total length of data returned for this configuration. Includes the combined length of all descriptors (configuration, interface, endpoint, and class- or vendor-specific) returned for this configuration.

    Since we scan through complete data for one configuration the wTotalLength is correct.

Reply
  • No, you are wrong. The original code is correct.

    USB Manual says the following:
    bLength - Size of descriptor
    wTotalLength - Total length of data returned for this configuration. Includes the combined length of all descriptors (configuration, interface, endpoint, and class- or vendor-specific) returned for this configuration.

    Since we scan through complete data for one configuration the wTotalLength is correct.

Children
No data