Author Topic: Multiple input reports using HID interrupt transfer  (Read 14216 times)

arador

  • Member
  • ***
  • Posts: 3
Multiple input reports using HID interrupt transfer
« on: September 12, 2011, 11:48:23 am »
Hello to everyone here!

I'm developing a HID device (rx62n) and using the LVR generic_hid_cs_46.
The main purpose of the device is to perform data acquisition.

I have defined the input report size to 4096 bytes (4Kb).
Using interrupt transfers, when I send a single output report, I can read a single input report perfectly using a single call to Readfile().

My purpose is to be able to reply with multiple input reports to a single output report.
When I split a large input report (8Kb) to 2 and send them twice, I only get the last report in the inputReportBuffer (which is large enough).

What am I missing here? Is it possible at all to make such kind of transfer?
How can I actually stream data from the device?

Any advise would be very helpful!
Oren


« Last Edit: September 13, 2011, 03:28:40 am by arador »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Multiple input reports using HID interrupt transfer
« Reply #1 on: September 12, 2011, 12:46:01 pm »
I will assume you're using only Report ID zero.

ReadFile returns as many reports as are available and will fit in the ReadFile buffer.

If the buffer is big enough to hold two reports and the device sends two reports, try adding a delay. (You can use a breakpoint for testing.) If that works, it means that both reports weren't in the buffer when you called ReadFile originally.

Jan