FabGL
ESP32 Display Controller and Graphics Library

◆ begin() [2/2]

void begin ( PS2Preset  preset = PS2Preset::KeyboardPort0_MousePort1,
KbdMode  keyboardMode = KbdMode::CreateVirtualKeysQueue 
)
static

Initializes PS2 device controller using default GPIOs.

Initializes the PS2 controller assigning:

  • GPIO_NUM_33 (CLK) and GPIO_NUM_32 (DATA) as PS/2 Port 0
  • GPIO_NUM_26 (CLK) and GPIO_NUM_27 (DATA) as PS/2 Port 1
Parameters
presetSpecifies what is connected to PS/2 ports (mouse, keyboard or boths).
keyboardModeSpecifies how handle keyboard virtual keys.

Example:

// Keyboard connected to port 0 and mouse to port1
PSController.begin(PS2Preset::KeyboardPort0_MousePort1);

Definition at line 1200 of file ps2controller.cpp.