Harvie / ps2dev

Arduino library to emulate PS2 keyboard/mouse
MIT License
114 stars 27 forks source link

Does this work on a Teensy 2.0? #13

Open sofakng opened 3 years ago

sofakng commented 3 years ago

Do you know if this would work on a Teensy 2.0? ...or does it require the Arduino bootloader/code?

Harvie commented 3 years ago

Never used teensy, so give it a try and let me know. It certainly requires Arduino API, such as digitalWrite(pin, LOW); and similar... Perhaps if you program Teensy using Arduino IDE, this will be probably part of the Teensy support package for Arduino. If you use different framework, it will probably be missing.

Personaly i would accept modifications to add HAL layer to support other platforms, this should be easy to implement. Just few wrappers and ifdefs around GPIO and interrupt code.

cyberluke commented 3 years ago

It works, I use it.

Harvie commented 3 years ago

@cyberluke Good to know. Thank you. Did you needed to modify something or do some extra setup?

cyberluke commented 3 years ago

No, works out of the box. You just need to download Arduino IDE for Teensy, which is called Teensyduino: https://www.pjrc.com/teensy/teensyduino.html

I shared a code with you in another thread for Teensy 3.2

The only change, if you want to use SPI is this code initialization:


#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
#include <SPI.h>