ESPHome  2024.12.2
key_provider.cpp
Go to the documentation of this file.
1 #include "key_provider.h"
2 
3 namespace esphome {
4 namespace key_provider {
5 
6 void KeyProvider::add_on_key_callback(std::function<void(uint8_t)> &&callback) {
7  this->key_callback_.add(std::move(callback));
8 }
9 
10 void KeyProvider::send_key_(uint8_t key) { this->key_callback_.call(key); }
11 
12 } // namespace key_provider
13 } // namespace esphome
CallbackManager< void(uint8_t)> key_callback_
Definition: key_provider.h:17
void add_on_key_callback(std::function< void(uint8_t)> &&callback)
Definition: key_provider.cpp:6
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7