ESPHome
2024.11.1
esphome
esphome
components
uart
button
uart_button.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/uart/uart.h
"
5
#include "
esphome/components/button/button.h
"
6
7
#include <vector>
8
9
namespace
esphome
{
10
namespace
uart {
11
12
class
UARTButton
:
public
button::Button
,
public
UARTDevice
,
public
Component
{
13
public
:
14
void
set_data
(
const
std::vector<uint8_t> &data) { this->
data_
= data; }
15
16
void
dump_config
()
override
;
17
18
protected
:
19
void
press_action
()
override
;
20
std::vector<uint8_t>
data_
;
21
};
22
23
}
// namespace uart
24
}
// namespace esphome
uart.h
esphome::button::Button
Base class for all buttons.
Definition:
button.h:29
esphome::Component
Definition:
component.h:68
button.h
esphome::uart::UARTButton::data_
std::vector< uint8_t > data_
Definition:
uart_button.h:20
esphome::uart::UARTButton::dump_config
void dump_config() override
Definition:
uart_button.cpp:14
esphome::uart::UARTButton::set_data
void set_data(const std::vector< uint8_t > &data)
Definition:
uart_button.h:14
esphome::uart::UARTDevice
Definition:
uart.h:12
esphome::uart::UARTButton::press_action
void press_action() override
Definition:
uart_button.cpp:9
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
esphome::uart::UARTButton
Definition:
uart_button.h:12
Generated by
1.8.13