PaulStoffregen / PS2Keyboard

PS/2 Keyboard Library for Arduino
http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html
147 stars 57 forks source link

pin <-> interrupt mapping seems wrong on atmega1284 #23

Open v0lker opened 5 years ago

v0lker commented 5 years ago

i connected CLK to the atmega1284 DIP's pin 3 (D2 / INT2), however the interrupt number calculated in PS2Keyboard::begin() was 0, not 2 as expected. took me an awfully long time to realise why ps2interrupt() wasn't called..

i got the desired value by using digitalPinToInterrupt(irq_pin) instead of what most of begin() does - is there any reason not to use the arduino-provided function?

PaulStoffregen commented 5 years ago

This library is very old, from long before Arduino had that function.

It should probably be updated. I can tell you I'm not doing any non-critical updates to any libraries until at least mid-2019. Currently working on a hardware project... the type that actually pays the bills, so I can then work on free software at other times. Ping me on this in July 2019.

v0lker commented 5 years ago

ah, ok, that makes sense. i'll send you a PR and you can merge it in july if you like...

v0lker commented 3 years ago

how time flies - ping...