This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What to do if no data avilable for "usbd_hid_getinreport"

In mdk4.20, the usb device hid class has 3 functions:

extern void usbd_hid_init (void);
extern void usbd_hid_getinreport (U8 *buf);
extern void usbd_hid_setoutreport (U8 *buf);

Problem is usbd_hid_getinreport is called continously, thus I must send back some bytes to host, what to do if there is no data avilable (e.g. key press) for the host?

Thanks.

0