core: improve timing in ps2_host_send to fix caps/num LEDs consistency #563
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for the great project. Typing this on a QPAD MK-80 over USB having both lost their PS/2 to USB adapter and failed to be happy with cheap active adapters not working on both Linux and Mac.
Anyway, I had a problem with the Caps Lock, Number Lock LEDs not being set correctly and the keyboard resetting itself when running on an 8MHz avr pro micro (32u4). Changing the pull-up resistors helped, but given what is said here: http://www.burtonsys.com/ps2_chapweske.htm that the data from host->keyboard is sampled on the rising CLK edge (cf falling edge) then removing the delay would seem appropriate. It could even be done differently, setting the data up just after the WAIT(clock_hi...) ?
I'll own up and say I've only tested this in interrupt mode (pro micro) and only on two PS/2 keyboards - the QPAD MK-80 and an old Chicony KB-5916. The Chicony would also lose some setting of the LEDs before, now both are solid.