1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-20 02:33:50 +01:00

Add support for matrix keypads (#4241)

Co-authored-by: Samuel Sieb <samuel@sieb.net>
This commit is contained in:
Samuel Sieb
2023-01-09 19:06:54 -08:00
committed by GitHub
parent 657fd9d0d5
commit fe55f3a43d
9 changed files with 365 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
#include "key_provider.h"
namespace esphome {
namespace key_provider {
void KeyProvider::add_on_key_callback(std::function<void(uint8_t)> &&callback) {
this->key_callback_.add(std::move(callback));
}
void KeyProvider::send_key_(uint8_t key) { this->key_callback_.call(key); }
} // namespace key_provider
} // namespace esphome