Files
esphome-lsm6ds/esphome/components/tm1638/binary_sensor/tm1638_key.cpp
T

12 lines
239 B
C++

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