ESPHome 2026.5.1
Loading...
Searching...
No Matches
tt21100.h
Go to the documentation of this file.
1#pragma once
2
6#include "esphome/core/hal.h"
7
8#include <vector>
9
10namespace esphome::tt21100 {
11
12using namespace touchscreen;
13
15 public:
16 virtual void update_button(uint8_t index, uint16_t state) = 0;
17};
18
20 public:
21 void setup() override;
22 void dump_config() override;
23 float get_setup_priority() const override;
24
26 void set_reset_pin(GPIOPin *pin) { this->reset_pin_ = pin; }
27
28 void register_button_listener(TT21100ButtonListener *listener) { this->button_listeners_.push_back(listener); }
29
30 protected:
31 void reset_();
32
33 void update_touches() override;
34
37
38 std::vector<TT21100ButtonListener *> button_listeners_;
39};
40
41} // namespace esphome::tt21100
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:132
virtual void update_button(uint8_t index, uint16_t state)=0
float get_setup_priority() const override
Definition tt21100.cpp:46
void register_button_listener(TT21100ButtonListener *listener)
Definition tt21100.h:28
std::vector< TT21100ButtonListener * > button_listeners_
Definition tt21100.h:38
InternalGPIOPin * interrupt_pin_
Definition tt21100.h:35
void set_interrupt_pin(InternalGPIOPin *pin)
Definition tt21100.h:25
void set_reset_pin(GPIOPin *pin)
Definition tt21100.h:26
bool state
Definition fan.h:2