12 static const char *
const TAG =
"cst816.touchscreen";
15 static const uint8_t REG_TOUCH_NUM = 0x02;
16 static const uint8_t REG_XPOS_HIGH = 0x03;
17 static const uint8_t REG_XPOS_LOW = 0x04;
18 static const uint8_t REG_YPOS_HIGH = 0x05;
19 static const uint8_t REG_YPOS_LOW = 0x06;
20 static const uint8_t REG_DIS_AUTOSLEEP = 0xFE;
21 static const uint8_t REG_CHIP_ID = 0xA7;
22 static const uint8_t REG_FW_VERSION = 0xA9;
23 static const uint8_t REG_SLEEP = 0xE5;
24 static const uint8_t REG_IRQ_CTL = 0xFA;
25 static const uint8_t IRQ_EN_MOTION = 0x70;
27 static const uint8_t CST826_CHIP_ID = 0x11;
28 static const uint8_t CST820_CHIP_ID = 0xB7;
29 static const uint8_t CST816S_CHIP_ID = 0xB4;
30 static const uint8_t CST816D_CHIP_ID = 0xB6;
31 static const uint8_t CST816T_CHIP_ID = 0xB5;
32 static const uint8_t CST716_CHIP_ID = 0x20;
41 void setup()
override;
42 void update_touches()
override;
44 void dump_config()
override;
51 void continue_setup_();
52 void update_button_state_(
bool state);
59 bool button_touched_{};
void set_reset_pin(GPIOPin *pin)
void register_button_listener(CST816ButtonListener *listener)
void set_interrupt_pin(InternalGPIOPin *pin)
Implementation of SPI Controller mode.
void set_skip_probe(bool skip_probe)
This Class provides the methods to read/write bytes from/to an i2c device.
std::vector< CST816ButtonListener * > button_listeners_