CyUSB ReadInput() Problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ReGo_1075006
Level 1
Level 1
Welcome!

For a new project I started with AN82072 - PSoC 3 and PSoC 5LP USB General Data Transfer with Standard HID Drivers

First all works fine of course.

Then I changed resolution of the ADC to 8 bit and data only is transferred when there is a change in ADC value or push button status.

( As in my new project: device only should send data when there is a request from host or when new data is available from device)

Windows OS then reports a problem with the application Generic HID UI.

In the Cypress CyUSB.NET DLL Programmer's Reference I found following note: ReadInput will hang indefinitely if the device does not have an Input report ready to be read.

and

Cypress Suite USB Release Notes / Known Issues tells:

3. In cyusb.dll, ReadInput() API will hang if the device does not have an input report ready.

So, how can the Windows Host Application determine whether there's an input available to use the ReadInput() command or is there any other way to get data from device?

I'm not a specialist in Windows Host programming so I would appreciate any simple solution.

0 Likes
1 Reply
Anonymous
Not applicable

Hi,

Please program your device such that as soon as it is started, it should be able to respond to ReadInput requests. The ReadInput API in the host triggers a GET_REPORT request in the device side.,

At this point, if the device does not have any actual data (report) to send, it should atleast respond with an empty report that corresponds to no action.

0 Likes