Author Topic: mapping HID reports on interrupt transfer  (Read 3968 times)

Adrien Decostre

  • Member
  • ***
  • Posts: 12
mapping HID reports on interrupt transfer
« on: May 21, 2018, 08:11:02 am »
Dear all,

In order to optimize a HID interface, I am looking for information on the way HID report are mapped on interrupt transfers. Are each report split on fully allocated interrupt transfers?
More concretely, for a high speed USB device on a Windows host, if a HID report has a length of 1524 bytes, how will it be mapped on interrupt transfers?
Will the driver send 2 interrupt transfers of 1024 bytes, with zero padding on the 2nd interrupt?
Will it send 1 interrupt transfer of 1024 bytes and 1 interrupt of 500 bytes?
Or will it send immediately 1 interrupt of 1024 bytes and buffer (as long as authorised for an interrupt transfer) the 2nd interrupt to wait for possible extra bytes to fill in the buffer?

Thanks a lot in advance for any help or any advise,

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: mapping HID reports on interrupt transfer
« Reply #1 on: May 21, 2018, 09:21:42 am »
The host schedules interrupt transactions according to the max. latency specified in the endpoint's descriptor.

A device endpoint can send data only in response to an IN token packet from the host.

For Input reports, the device may respond with NAK until data is ready to send.

If the final transaction requires less than the maximum packet length for the endpoint, the transaction is a short packet (no padding).

Adrien Decostre

  • Member
  • ***
  • Posts: 12
Re: mapping HID reports on interrupt transfer
« Reply #2 on: May 21, 2018, 11:33:29 am »
Thanks a lot for the quick answer and the clarification  :)