borb / amigahid-pico

Use USB input devices on Amiga computers, using the excellent Raspberry Pi Pico as a USB-to-bitbang adapter.
51 stars 4 forks source link

Update caps lock LED #2

Closed rfuest closed 2 years ago

rfuest commented 2 years ago

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.

borb commented 2 years ago

@rfuest, you are a certified genius. Fantastic job. Will get this into the tree today.

rfuest commented 2 years ago

@rfuest, you are a certified genius.

Not sure about that, but thanks :wink: