ESPHome 2025.6.0
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
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 {
11namespace tt21100 {
12
13using namespace touchscreen;
14
16 public:
17 virtual void update_button(uint8_t index, uint16_t state) = 0;
18};
19
21 public:
22 void setup() override;
23 void dump_config() override;
24 float get_setup_priority() const override;
25
27 void set_reset_pin(GPIOPin *pin) { this->reset_pin_ = pin; }
28
29 void register_button_listener(TT21100ButtonListener *listener) { this->button_listeners_.push_back(listener); }
30
31 protected:
32 void reset_();
33
34 void update_touches() override;
35
38
39 std::vector<TT21100ButtonListener *> button_listeners_;
40};
41
42} // namespace tt21100
43} // namespace esphome
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:133
virtual void update_button(uint8_t index, uint16_t state)=0
float get_setup_priority() const override
Definition tt21100.cpp:47
void register_button_listener(TT21100ButtonListener *listener)
Definition tt21100.h:29
std::vector< TT21100ButtonListener * > button_listeners_
Definition tt21100.h:39
InternalGPIOPin * interrupt_pin_
Definition tt21100.h:36
void set_interrupt_pin(InternalGPIOPin *pin)
Definition tt21100.h:26
void set_reset_pin(GPIOPin *pin)
Definition tt21100.h:27
bool state
Definition fan.h:0
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7