This PR tries to fix the update of the caps lock LED. I had encountered the same issue while I had previously tested tinyusb's host mode. I assume that tuh_hid_set_report doesn't copy the passed data and the buffer must remain valid until the packet is sent.
My quick and dirty hack to fix the issue is to use a global variable to store the LED report data. I haven't looked at the surrounding code in much detail and maybe it will break with multiple attached keyboards, but I hope that it helps anyway.
This PR tries to fix the update of the caps lock LED. I had encountered the same issue while I had previously tested tinyusb's host mode. I assume that
tuh_hid_set_report
doesn't copy the passed data and the buffer must remain valid until the packet is sent.My quick and dirty hack to fix the issue is to use a global variable to store the LED report data. I haven't looked at the surrounding code in much detail and maybe it will break with multiple attached keyboards, but I hope that it helps anyway.