Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ps2keyboard library not working on Arduino Zero #32

Open
tinkerBOY-git opened this issue Nov 28, 2019 · 4 comments
Open

Ps2keyboard library not working on Arduino Zero #32

tinkerBOY-git opened this issue Nov 28, 2019 · 4 comments

Comments

@tinkerBOY-git
Copy link

Library doe not work with Arduino Zero. Is there a workaround?

@no1so
Copy link

no1so commented Jan 26, 2020

@tinkerBOY-git I am having the same problem trying to get this library working with a SAMD based board. Not a Arduino Zero but a Adafruit Feather M0 which uses the same board as the Zero.

Did you ever find anything out regarding this?

@tinkerBOY-git
Copy link
Author

No, sorry.

@MatthewBregg
Copy link

I'm using an M0, and got the library working.

The key was

attachInterrupt(irq_num, ps2interrupt, FALLING);
, as the M0 doesn't technically have all interrupt pins, (22 isn't), the earlier check
#ifdef CORE_INT_EVERY_PIN
isn't defined, and the IRQ_NUM remains 255, so the interrupt is never attached.

For a quick hack, just remove the preprocessor directive at

#ifdef CORE_INT_EVERY_PIN
and set irq_num = irq_pin unconditionally.

One suggestion: Could begin return a simple error code/bool indicating if the irq_num ever got set? Would make this a lot easier to debug and notice!

@DavyVos
Copy link

DavyVos commented Apr 20, 2024

@MatthewBregg thanks for your answer, I encountered the same problem using a stm32 nucleo 64 f303re board.
The issue indeed seems to be that irq_num is never set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants