PS2 keyboard library for pico-sdk
Based on PS2Keyboard
Add the pico-ps2Driv subdirectory to the CMakeLists.txt of your project and include the library in target_link_libraries.
Before reading the keyboard, it must be initialized with PS2_init.
PS2_init takes the data and clock pins as a parameters.
Example: PS2_init(3, 2);
initializes the keyboard, using GPIO3 as data and GPIO2 as clock.
PS2_keyAvailable()
returns 1 if there are keys to be read, 0 otherwise.
PS2_readKey()
returns the character associated to the next keystroke in the buffer.