Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

pico-ps2Driv

PS2 keyboard library for pico-sdk
Based on PS2Keyboard

Usage

Add the pico-ps2Driv subdirectory to the CMakeLists.txt of your project and include the library in target_link_libraries.

Initializing the keyboard

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.

Reading the keybaord

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.