FabGL
ESP32 Display Controller and Graphics Library

◆ begin() [1/2]

void begin ( gpio_num_t  clkGPIO,
gpio_num_t  dataGPIO 
)

Initializes Mouse specifying CLOCK and DATA GPIOs.

A reset command (Mouse.reset() method) is automatically sent to the mouse.
This method also initializes the PS2Controller to use port 0 only.

Because PS/2 ports are handled by the ULP processor, just few GPIO ports are actually usable. They are: GPIO_NUM_2, GPIO_NUM_4, GPIO_NUM_12 (with some limitations), GPIO_NUM_13, GPIO_NUM_14, GPIO_NUM_15, GPIO_NUM_25, GPIO_NUM_26, GPIO_NUM_27, GPIO_NUM_32 and GPIO_NUM_33.

Parameters
clkGPIOThe GPIO number of Clock line
dataGPIOThe GPIO number of Data line

Example:

// Setup pins GPIO26 for CLK and GPIO27 for DATA
Mouse.begin(GPIO_NUM_26, GPIO_NUM_27);
Examples
Others/MouseStudio/MouseStudio.ino.

Definition at line 83 of file mouse.cpp.