I am struggling with how and where to implement the LED controls (Caps Lock etc) of a keyboard. As far as I understand it this is accomplished through a USBH_HID_SetReport(phost, 0x02, 0x00, rep, 0x01). Please help.
I am trying to implement a USB Host for keyboard and mouse. I have successfully implemented the demo that is shown here:
https://www.youtube.com/watch?v=MlhUG4GsOT0
Key presses are all being received successfully by the host.
I am struggling with how and where to implement the LED controls of a keyboard. As far as I understand it this is accomplished through a USBH_HID_SetReport(phost, 0x02, 0x00, rep, 0x01).
Using the function above will never send the report through and will always return a busy status.
If anyone could advise when and where this should be implemented it would be greatly appreciated.
If you have any questions please let me know.