32#include "../SensorBuildOpt.h"
33#if !SENSORLIB_EXCLUDE_TOUCH_HI8561
37static constexpr uint8_t HI8561_SLAVE_ADDRESS = (0x68);
66 void sleep()
override;
93 bool initImpl(uint8_t)
override;
95 bool inline makePacketThenRead(uint32_t addr, uint8_t *data, uint16_t len)
99 addrBuf[1] = (uint8_t)((addr & 0xFF000000) >> 24);
100 addrBuf[2] = (uint8_t)((addr & 0x00FF0000) >> 16);
101 addrBuf[3] = (uint8_t)((addr & 0x0000FF00) >> 8);
102 addrBuf[4] = (uint8_t)((addr & 0x000000FF) >> 0);
104 return writeThenRead(addrBuf,
sizeof(addrBuf), data, len) == 0;
int writeThenRead(const uint8_t *write_buffer, size_t write_len, uint8_t *read_buffer, size_t read_len)
HI8561 Touchscreen Display Chip Touch Class This class provides the touch reading functionality for t...
~TouchDrvHI8561()=default
Destructor for the touch driver.
static constexpr uint32_t REG_SECTION_INFO
static constexpr uint8_t BYTES_OFFSET
TouchDrvHI8561()=default
Constructor for the touch driver.
static constexpr uint32_t REG_INFO
const TouchPoints & getTouchPoints() override
Get the touch points.
void sleep() override
Puts the touch driver to sleep.
static constexpr uint8_t BYTES_PER_POINT
static constexpr uint32_t REG_POINT
const char * getModelName() override
Get the model name.
static constexpr uint8_t MAX_FINGER_NUM
Abstract base class for touch screen drivers.
Container for touch point data and optional gesture information.