SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
TouchDrvCST226.hpp
Go to the documentation of this file.
1
29#pragma once
30
31#include "../SensorBuildOpt.h"
32#if !SENSORLIB_EXCLUDE_TOUCH_CST226
33
34#include "TouchDrvInterface.hpp"
35
36static constexpr uint8_t CST226SE_SLAVE_ADDRESS = (0x5A);
37static constexpr uint8_t CST3240_SLAVE_ADDRESS = (0x5A);
38
40{
41public:
47 TouchDrvCST226() = default;
48
53 ~TouchDrvCST226() = default;
54
60 void reset() override;
61
69 void sleep() override;
70
76 const TouchPoints &getTouchPoints() override;
77
83 const char *getModelName() override;
84
85private:
86 static constexpr uint8_t CST226SE_CHIPTYPE = (0xA8);
87 static constexpr uint8_t CST328_CHIPTYPE = (0x48);
88 static constexpr uint32_t CST3240_CHIPTYPE = (0x3240);
89 static constexpr uint8_t MAX_FINGER_NUM = (5);
90
91 bool initImpl(uint8_t) override;
92};
93
94#endif
const char * getModelName() override
Get the model name.
void sleep() override
Puts the touch driver to sleep.
TouchDrvCST226()=default
Constructor for the touch driver.
void reset() override
Reset the touch driver.
~TouchDrvCST226()=default
Destructor for the touch driver.
const TouchPoints & getTouchPoints() override
Get the touch points.
Abstract base class for touch screen drivers.
virtual uint8_t getPoint(int16_t *x_array, int16_t *y_array, uint8_t get_point=1) __attribute__((deprecated("use getTouchPoints instead of getPoint")))
Retrieve touch point coordinates (deprecated).
Container for touch point data and optional gesture information.