ESPHome  2024.4.2
uart_button.cpp
Go to the documentation of this file.
1 #include "uart_button.h"
2 #include "esphome/core/log.h"
3 
4 namespace esphome {
5 namespace uart {
6 
7 static const char *const TAG = "uart.button";
8 
10  ESP_LOGD(TAG, "'%s': Sending data...", this->get_name().c_str());
11  this->write_array(this->data_.data(), this->data_.size());
12 }
13 
14 void UARTButton::dump_config() { LOG_BUTTON("", "UART Button", this); }
15 
16 } // namespace uart
17 } // namespace esphome
void write_array(const uint8_t *data, size_t len)
Definition: uart.h:21
const char *const TAG
Definition: spi.cpp:8
std::vector< uint8_t > data_
Definition: uart_button.h:20
void dump_config() override
Definition: uart_button.cpp:14
void press_action() override
Definition: uart_button.cpp:9
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
const StringRef & get_name() const
Definition: entity_base.cpp:10