lpcware

USB HID rom driver

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by mindless on Sun Jun 20 15:06:52 MST 2010
Hello:

I'm playing around with the HID rom-based driver.
I'm having some questions regarding its behaviour and cannot find any related documentation.

I modified the example so that the packet size is 64 byte long and single write/read reports works ok. However, if I try to read a larger amount of data in 64B chunks I'm unable to do it.

The  src and dst buffers in the report callbacks are located in USB ram space and both point to the same address. My polling interval is set to 32ms and as far as I can see with the JTAG, the GetInReport function is called periodically (SetOutReport isn't). My problem is that I cannot distinguish between a periodic call or a real reading from the PC host side and thus, the responses got mixed up and I read random packets every time.

This happens because I increment a pointer in each call to GetInReport to point to the next 64B chunk but not every call to GetInReport belongs to the multiple read in the PC side...

I guess that the rom-based driver might not be intended to do this but if somebody could shed a light on it, it'll be much appreciated.

Regards,
mindless

Outcomes