48#include <XPowersAXP202.tpp>
55#if defined(ARDUINO_T_WATCH)
56 bool ret = power.
begin(Wire1, AXP202_SLAVE_ADDRESS, 21, 22);
58 Serial.println(
"PMU NOT FOUND!\n");
61 power.setLDO2Voltage(3300); power.enableLDO2();
76 Serial.println(
"Failed to find FT6X36 - check your wiring!");
92 Serial.println(
"Touch Info:");
104 if (resX == 0 || resY == 0) {
105 Serial.println(
"The touch driver not support get touch resolution,please use setResolution() to set touch resolution.");
108 Serial.print(
"Resolution: "); Serial.print(resX); Serial.print(
" x "); Serial.println(resY);
121 Serial.print(
"ID: ");
122 Serial.print(point.
id);
125 Serial.print(point.
x);
128 Serial.print(point.
y);
130 Serial.print(
"Pressure: ");
133 Serial.print(
"Event: ");
134 switch (point.
event) {
135 case 0: Serial.print(
"Put Down");
break;
136 case 1: Serial.print(
"Put Up");
break;
137 case 2: Serial.print(
"Contact");
break;
138 default: Serial.print(
"Unknown");
break;
void interruptPolling(void)
Polling mode for touch interrupt.
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 uint32_t getChipID()
Get the chip identifier (e.g., ID register value).
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 pressure
Pressure value (0 if not supported by the chip).
uint8_t event
Event type based on actual hardware feedback, most touch devices do not support.
uint8_t id
Touch point ID for multi‑touch tracking.
uint16_t x
X coordinate of the touch point.
uint16_t y
Y coordinate of the touch point.