50#ifdef ARDUINO_T_AMOLED_147
51#include <XPowersAXP2101.tpp>
58#if defined(ARDUINO_T_AMOLED_147)
61 Serial.println(
"PMU NOT FOUND!\n");
63 power.setALDO1Voltage(1800); power.enableALDO1();
64 power.setALDO3Voltage(3300); power.enableALDO3();
65 power.setBLDO1Voltage(1800); power.enableBLDO1();
78 Serial.println(
"Failed to find CHSC5816 - check your wiring!");
84 Serial.println(
"Init CHSC5816 Touch device success!");
86 Serial.println(
"Touch Info:");
92 if (resX == 0 || resY == 0) {
93 Serial.println(
"The touch driver not support get touch resolution,please use setResolution() to set touch resolution.");
96 Serial.print(
"Resolution: "); Serial.print(resX); Serial.print(
" x "); Serial.println(resY);
112 Serial.print(point.
x);
117 Serial.print(point.
y);
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 uint32_t getChipID()
Get the chip identifier (e.g., ID register value).
virtual bool isPressed(uint32_t filter_ms=0)
Check if any touch point is currently pressed.
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.