60 Serial.println(
"Failed to find GT911 - check your wiring!");
65 Serial.println(
"Init GT911 Sensor success!");
69 Serial.println(
"Home button pressed!");
90 Serial.println(
"Touch Info:");
96 if (resX == 0 || resY == 0) {
97 Serial.println(
"The touch driver not support get touch resolution,please use setResolution() to set touch resolution.");
100 Serial.print(
"Resolution: "); Serial.print(resX); Serial.print(
" x "); Serial.println(resY);
116 Serial.print(point.
x);
121 Serial.print(point.
y);
uint32_t getChipID() override
Get the chip ID.
const char * getModelName() override
Get the model name.
const TouchPoints & getTouchPoints() override
Get the touch points.
virtual bool begin(SensorCommCustom::CustomCallback callback, SensorCommCustomHal::CustomHalCallback hal_callback, uint8_t addr)
Initialize the touch driver with custom communication callbacks.
virtual uint16_t getResolutionX()
Get the raw maximum X coordinate of the touch panel.
virtual uint8_t getSupportTouchPoint()
Get the maximum number of touch points supported by the hardware.
virtual void setPins(int rst, int irq)
Set the hardware reset and interrupt pin numbers.
virtual bool isPressed(uint32_t filter_ms=0)
Check if any touch point is currently pressed.
virtual void setHomeButtonCallback(HomeButtonCallback cb, void *user_data)
Register a callback for home button events.
virtual uint16_t getResolutionY()
Get the raw maximum Y coordinate of the touch panel.
Container for touch point data and optional gesture information.
uint8_t getPointCount() const
Returns the number of stored touch points.
TouchPoint & getPoint(uint8_t index)
Gets a reference to a touch point at the specified index.
bool hasPoints() const
Checks whether any touch points are stored.
Represents a single touch point with its properties.
uint16_t x
X coordinate of the touch point.
uint16_t y
Y coordinate of the touch point.