ESPHome
2025.9.0-dev
Loading...
Searching...
No Matches
esphome
components
tt21100
binary_sensor
tt21100_button.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/binary_sensor/binary_sensor.h
"
4
#include "
esphome/components/tt21100/touchscreen/tt21100.h
"
5
#include "
esphome/core/component.h
"
6
#include "
esphome/core/helpers.h
"
7
8
namespace
esphome
{
9
namespace
tt21100 {
10
11
class
TT21100Button
:
public
binary_sensor::BinarySensor
,
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
binary_sensor.h
esphome::Component
Definition
component.h:71
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition
helpers.h:656
esphome::binary_sensor::BinarySensor
Base class for all binary_sensor-type classes.
Definition
binary_sensor.h:36
esphome::binary_sensor::BinarySensor::state
bool state
Definition
binary_sensor.h:65
esphome::tt21100::TT21100Button
Definition
tt21100_button.h:14
esphome::tt21100::TT21100Button::setup
void setup() override
Definition
tt21100_button.cpp:9
esphome::tt21100::TT21100Button::dump_config
void dump_config() override
Definition
tt21100_button.cpp:14
esphome::tt21100::TT21100Button::update_button
void update_button(uint8_t index, uint16_t state) override
Definition
tt21100_button.cpp:19
esphome::tt21100::TT21100Button::index_
uint8_t index_
Definition
tt21100_button.h:24
esphome::tt21100::TT21100Button::set_index
void set_index(uint8_t index)
Definition
tt21100_button.h:19
esphome::tt21100::TT21100ButtonListener
Definition
tt21100.h:15
component.h
helpers.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
tt21100.h
Generated by
1.12.0