FabGL
ESP32 Display Controller and Graphics Library
PS2Controller Class Reference

The PS2 device controller class. More...

#include <ps2controller.h>

Public Member Functions

void begin (gpio_num_t port0_clkGPIO, gpio_num_t port0_datGPIO, gpio_num_t port1_clkGPIO=GPIO_UNUSED, gpio_num_t port1_datGPIO=GPIO_UNUSED)
 Initializes PS2 device controller. More...
 
void begin (PS2Preset preset=PS2Preset::KeyboardPort0_MousePort1, KbdMode keyboardMode=KbdMode::CreateVirtualKeysQueue)
 Initializes PS2 device controller using default GPIOs. More...
 
int dataAvailable (int PS2Port)
 Gets the number of scancodes available in the controller buffer. More...
 
int getData (int PS2Port)
 Gets a scancode from the queue. More...
 
void injectInRXBuffer (int value, int PS2Port)
 Injects a byte into the RX buffer. More...
 
Keyboardkeyboard ()
 Returns the instance of Keyboard object automatically created by PS2Controller. More...
 
Mousemouse ()
 Returns the instance of Mouse object automatically created by PS2Controller. More...
 
void resume ()
 Resumes PS/2 ports operations. More...
 
void sendData (uint8_t data, int PS2Port)
 Sends a command to the device. More...
 
void suspend ()
 Suspends PS/2 ports operations. More...
 

Static Public Member Functions

static PS2Controllerinstance ()
 Returns the singleton instance of PS2Controller class. More...
 

Detailed Description


The documentation for this class was generated from the following files: