38#include "freertos/FreeRTOS.h"
39#include "freertos/timers.h"
136 void begin(gpio_num_t clkGPIO, gpio_num_t dataGPIO);
152 void begin(
int PS2Port);
255 bool setScaling(
int value) {
return send_cmdSetScaling(value); }
378 static void mouseUpdateTask(
void * arg);
381 static bool s_quickCheckHardware;
383 bool m_mouseAvailable;
386 TaskHandle_t m_mouseUpdateTask;
389 QueueHandle_t m_receivedPacket;
392 bool m_absoluteUpdate;
396 int64_t m_prevDeltaTime;
397 int m_movementAcceleration;
398 int m_wheelAcceleration;
399 QueueHandle_t m_absoluteQueue;
Represents the base abstract class for bitmapped display controllers.
MouseStatus & status()
Gets or sets current mouse status.
bool setResolution(int value)
Sets the resolution.
bool getNextPacket(MousePacket *packet, int timeOutMS=-1, bool requestResendOnTimeOut=false)
Gets a mouse raw movement (packet) from the queue.
bool setScaling(int value)
Sets the scaling.
bool deltaAvailable()
Determines if there is a mouse movement available in the queue.
int & wheelAcceleration()
Gets or sets wheel acceleration factor.
void setupAbsolutePositioner(int width, int height, bool createAbsolutePositionsQueue, BitmappedDisplayController *updateDisplayController=nullptr, uiApp *app=nullptr)
Initializes absolute position handler.
void terminateAbsolutePositioner()
Terminates absolute position handler.
bool packetAvailable()
Determines if there is a raw mouse movement available in the queue.
bool setSampleRate(int value)
Sets the maximum rate of mouse movements reporting.
bool reset()
Sends a Reset command to the mouse.
void begin(gpio_num_t clkGPIO, gpio_num_t dataGPIO)
Initializes Mouse specifying CLOCK and DATA GPIOs.
bool isMouseAvailable()
Checks if mouse has been detected and correctly initialized.
bool getNextDelta(MouseDelta *delta, int timeOutMS=-1, bool requestResendOnTimeOut=false)
Gets a mouse movement from the queue.
void setUIApp(uiApp *app)
Sets current UI app.
int & movementAcceleration()
Gets or set mouse movement acceleration factor.
int getPacketSize()
Gets mouse packet size.
MouseStatus getNextStatus(int timeOutMS=-1)
Gets the next status from the status queue.
int availableStatus()
Gets the number of available mouse status.
void emptyQueue()
Empties the mouse status and events queue.
void updateAbsolutePosition(MouseDelta *delta)
Updates absolute position from the specified mouse delta event.
static void quickCheckHardware()
Disable re-try when a mouse is not found.
The PS2 Mouse controller class.
Base class for PS2 devices (like mouse or keyboard).
Represents the whole application base class.
This file contains FabGL library configuration settings, like number of supported colors,...
This file contains all classes related to FabGL Graphical User Interface.
This file contains some utility classes and functions.
MouseType
Describes mouse type.
This file contains fabgl::PS2Device definition.
Describes mouse movement and buttons status.
Contains raw data received from mouse.
Describes mouse absolute position, scroll wheel delta and buttons status.
Represents a bidimensional size.