ESPHome  2024.11.2
uart_button.h
Go to the documentation of this file.
1 #pragma once
2 
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
Base class for all buttons.
Definition: button.h:29
std::vector< uint8_t > data_
Definition: uart_button.h:20
void dump_config() override
Definition: uart_button.cpp:14
void set_data(const std::vector< uint8_t > &data)
Definition: uart_button.h:14
void press_action() override
Definition: uart_button.cpp:9
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7