10 namespace ttp229_bsf {
26 void setup()
override;
27 void dump_config()
override;
31 if (!this->sdo_pin_->digital_read()) {
35 for (uint8_t i = 0; i < 16; i++) {
36 this->scl_pin_->digital_write(
false);
38 bool bitval = !this->sdo_pin_->digital_read();
39 this->scl_pin_->digital_write(
true);
42 touched |= uint16_t(bitval) << i;
44 for (
auto *channel : this->channels_) {
45 channel->process(touched);
52 std::vector<TTP229BSFChannel *> channels_{};
const float DATA
For components that import data from directly connected sensors like DHT.
void set_scl_pin(GPIOPin *scl_pin)
void process(uint16_t data)
float get_setup_priority() const override
void set_channel(uint8_t channel)
void publish_state(bool state)
Publish a new state to the front-end.
void set_sdo_pin(GPIOPin *sdo_pin)
void register_channel(TTP229BSFChannel *channel)
Implementation of SPI Controller mode.
Base class for all binary_sensor-type classes.
void IRAM_ATTR HOT delayMicroseconds(uint32_t us)