ESPHome  2024.10.2
tt21100_button.h
Go to the documentation of this file.
1 #pragma once
2 
6 #include "esphome/core/helpers.h"
7 
8 namespace esphome {
9 namespace tt21100 {
10 
12  public Component,
13  public TT21100ButtonListener,
14  public Parented<TT21100Touchscreen> {
15  public:
16  void setup() override;
17  void dump_config() override;
18 
19  void set_index(uint8_t index) { this->index_ = index; }
20 
21  void update_button(uint8_t index, uint16_t state) override;
22 
23  protected:
24  uint8_t index_;
25 };
26 
27 } // namespace tt21100
28 } // namespace esphome
void set_index(uint8_t index)
void update_button(uint8_t index, uint16_t state) override
bool state
The current reported state of the binary sensor.
Definition: binary_sensor.h:61
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base class for all binary_sensor-type classes.
Definition: binary_sensor.h:37
Helper class to easily give an object a parent of type T.
Definition: helpers.h:521