Add support for TM1638 Led and Key component (#3340)

This commit is contained in:
Jordan W. Cobb authored and GitHub committed 2022-09-12 08:30:15 -07:00
1 parent 9ff187c3f8
commit cbd8d70431
17 files changed
+855

No files matched your search

@@ -0,0 +1,13 @@
#include "tm1638_key.h"
namespace esphome {
namespace tm1638 {
void TM1638Key::keys_update(uint8_t keys) {
bool pressed = keys & (1 << key_code_);
if (pressed != this->state)
this->publish_state(pressed);
}
} // namespace tm1638
} // namespace esphome