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;
static void quickCheckHardware()
Disable re-try when a mouse is not found.
bool setScaling(int value)
Sets the scaling.
bool setResolution(int value)
Sets the resolution.
Represents the whole application base class.
Contains raw data received from mouse.
This file contains all classes related to FabGL Graphical User Interface.
bool setSampleRate(int value)
Sets the maximum rate of mouse movements reporting.
int & wheelAcceleration()
Gets or sets wheel acceleration factor.
int & movementAcceleration()
Gets or set mouse movement acceleration factor.
int getPacketSize()
Gets mouse packet size.
MouseType
Describes mouse type.
Represents the base abstract class for bitmapped display controllers.
Describes mouse movement and buttons status.
Describes mouse absolute position, scroll wheel delta and buttons status.
MouseStatus getNextStatus(int timeOutMS=-1)
Gets the next status from the status queue.
void emptyQueue()
Empties the mouse status and events queue.
This file contains some utility classes and functions.
bool deltaAvailable()
Determines if there is a mouse movement available in the queue.
bool packetAvailable()
Determines if there is a raw mouse movement available in the queue.
bool isMouseAvailable()
Checks if mouse has been detected and correctly initialized.
void terminateAbsolutePositioner()
Terminates absolute position handler.
Base class for PS2 devices (like mouse or keyboard).
bool getNextPacket(MousePacket *packet, int timeOutMS=-1, bool requestResendOnTimeOut=false)
Gets a mouse raw movement (packet) from the queue.
This file contains FabGL library configuration settings, like number of supported colors...
bool getNextDelta(MouseDelta *delta, int timeOutMS=-1, bool requestResendOnTimeOut=false)
Gets a mouse movement from the queue.
Represents a bidimensional size.
void setUIApp(uiApp *app)
Sets current UI app.
MouseStatus & status()
Gets or sets current mouse status.
int availableStatus()
Gets the number of available mouse status.
void begin(gpio_num_t clkGPIO, gpio_num_t dataGPIO)
Initializes Mouse specifying CLOCK and DATA GPIOs.
void updateAbsolutePosition(MouseDelta *delta)
Updates absolute position from the specified mouse delta event.
The PS2 Mouse controller class.
void setupAbsolutePositioner(int width, int height, bool createAbsolutePositionsQueue, BitmappedDisplayController *updateDisplayController=nullptr, uiApp *app=nullptr)
Initializes absolute position handler.
bool reset()
Sends a Reset command to the mouse.
This file contains fabgl::PS2Device definition.