ESPHome
2024.12.2
esphome
esphome
components
gt911
binary_sensor
gt911_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/gt911/touchscreen/gt911_touchscreen.h
"
5
#include "
esphome/core/component.h
"
6
#include "
esphome/core/helpers.h
"
7
8
namespace
esphome
{
9
namespace
gt911 {
10
11
class
GT911Button
:
public
binary_sensor::BinarySensor
,
12
public
Component
,
13
public
GT911ButtonListener
,
14
public
Parented
<GT911Touchscreen> {
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,
bool
state
)
override
;
22
23
protected
:
24
uint8_t
index_
;
25
};
26
27
}
// namespace gt911
28
}
// namespace esphome
esphome::gt911::GT911Button::index_
uint8_t index_
Definition:
gt911_button.h:24
gt911_touchscreen.h
esphome::Component
Definition:
component.h:68
esphome::gt911::GT911Button::update_button
void update_button(uint8_t index, bool state) override
Definition:
gt911_button.cpp:19
esphome::gt911::GT911ButtonListener
Definition:
gt911_touchscreen.h:11
binary_sensor.h
esphome::gt911::GT911Button::set_index
void set_index(uint8_t index)
Definition:
gt911_button.h:19
esphome::binary_sensor::BinarySensor::state
bool state
The current reported state of the binary sensor.
Definition:
binary_sensor.h:61
esphome::gt911::GT911Button::setup
void setup() override
Definition:
gt911_button.cpp:9
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
esphome::binary_sensor::BinarySensor
Base class for all binary_sensor-type classes.
Definition:
binary_sensor.h:37
esphome::gt911::GT911Button
Definition:
gt911_button.h:11
helpers.h
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition:
helpers.h:530
esphome::gt911::GT911Button::dump_config
void dump_config() override
Definition:
gt911_button.cpp:14
Generated by
1.8.13