Keil™, An ARM® Company

Discussion Forum

No HID interrupt IN transfers

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Author
Amir Couto
Posted
24-Nov-2009 11:46 GMT
Toolset
ARM
New! No HID interrupt IN transfers

Hi
iÂ'm using the MCB2300 Board, with HID usb example.
But this example send continually reports to host, i would like send data to host only when the host call a readfile ,what i do???

Author
Tsuneo Chinzei
Posted
25-Nov-2009 14:04 GMT
Toolset
ARM
New! RE: No HID interrupt IN transfers

> i would like send data to host only when the host call a readfile ,what i do???

You can't.
ReadFile() on a PC app accesses just to an input buffer on the HID device driver. It doesn't read from your HID device directly. So, the action caused by ReadFile() is not passed to the device.

To do similar operation, you have to notify the request directly from the PC app to the device.
Send an ouput report from your PC app, first.
When the device receives the output report, the device fills the IN endpoint with an input report.
This input report is sent to HID device driver, and held in the input buffer, automatically.
And then, your PC app read the input report from the HID device driver.

You may have interest on the discussion on this link.

No HID interrupt IN transfers
http://www.keil.com/forum/docs/thread15613.asp

Tsuneo

Author
Amir Couto
Posted
26-Nov-2009 16:50 GMT
Toolset
ARM
New! RE: No HID interrupt IN transfers

Tsuneo,

I did this steps:

Send an ouput report from your PC app, first.
When the device receives the output report, the device fills the IN endpoint with an input report.
This input report is sent to HID device driver, and held in the input buffer, automatically.
And then, your PC app read the input report from the HID device driver.

But when i call the readFile from pc host, the app hold , and donÂ't work anymore, only reseting the mcb board.

what happened?

Next Thread | Thread List | Previous Thread Start a Thread | Settings