Content originally posted in LPCWare by mindless on Wed Jun 23 00:54:20 MST 2010
Hi Johnny,
Thanks for your answer.
I think that my problem is the limitation that the HID rom driver offers - to my eyes - whenever the user tries to do something different from the example provided.
The callbacks for in/out reports are:
void GetInReport (uint8_t src[], uint32_t length)
void SetOutReport (uint8_t dst[], uint32_t length)
In the rom implementation there's no way to send a Report to the PC asynchronously and there's no way to not answer a report when an IN report arrives either.
Are the following facts correct?
1. The GetInReport callback is called ONLY periodically.
2. The SetOutReport callback is called ONLY when the PC app sends an output report.
In my non-working application, the PC side attemps to read 1024B in 64B chunks so after a specific OUT report arrives, I reset a pointer and start filling out the src buffer with 64B chunks in every call to GetInReport.
However I can't get the 1024B on the PC side. Debugging the PC side I found out that there are missing chunks and also the first received chunk on the PC is not always the same - sometimes it's the 2nd one I meant to send from the LPC, some others it's the 3rd and so forth... -
Cheers,
mindless