FabGL
ESP32 VGA Controller and Graphics Library
fabgl::PS2DeviceClass Class Reference

Base class for PS2 devices (like mouse or keyboard). More...

#include <ps2device.h>

Inheritance diagram for fabgl::PS2DeviceClass:

Public Member Functions

PS2Device identify ()
 Identifies the device attached to the PS2 port. More...
 
bool lock (int timeOutMS)
 Gets exclusive access to the device. More...
 
void unlock ()
 Releases device from exclusive access. More...
 

Detailed Description

Base class for PS2 devices (like mouse or keyboard).

PS2DeviceClass connects to one port of the PS2 Controller class (fabgl::PS2ControllerClass).
The PS2 controller uses ULP coprocessor and RTC slow memory to communicate with the PS2 device.

Applications should not use PS2DeviceClass directly: use instead fabgl::MouseClass or fabgl::KeyboardClass.

Member Function Documentation

◆ identify()

PS2Device fabgl::PS2DeviceClass::identify ( )
inline

Identifies the device attached to the PS2 port.

Returns
The identification ID sent by keyboard.
Examples:
KeyboardStudio/KeyboardStudio.ino, and MouseStudio/MouseStudio.ino.

◆ lock()

bool fabgl::PS2DeviceClass::lock ( int  timeOutMS)

Gets exclusive access to the device.

Parameters
timeOutMSTimeout in milliseconds to wait before fail.
Returns
True if the device has been locked.

◆ unlock()

void fabgl::PS2DeviceClass::unlock ( )

Releases device from exclusive access.


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