57 virtual void setup() = 0;
58 virtual void process(uint16_t data) = 0;
64 void set_touch_debounce(uint8_t debounce);
65 void set_release_debounce(uint8_t debounce);
70 void setup()
override;
71 void dump_config()
override;
78 bool digital_read(uint8_t ionum);
79 void digital_write(uint8_t ionum,
bool value);
83 std::vector<MPR121Channel *> channels_{};
85 uint8_t touch_threshold_{};
86 uint8_t release_threshold_{};
87 uint8_t max_touch_channel_{3};
97 uint8_t gpio_enable_{0x00};
99 uint8_t gpio_direction_{0x00};
101 uint8_t gpio_output_{0x00};
103 uint8_t gpio_input_{0x00};
109 void setup()
override;
111 bool digital_read()
override;
112 void digital_write(
bool value)
override;
113 std::string dump_summary()
const override;
116 void set_pin(uint8_t pin) { this->pin_ = pin; }
MPR121Component * parent_
void set_release_threshold(uint8_t release_threshold)
void set_touch_threshold(uint8_t touch_threshold)
void set_flags(gpio::Flags flags)
virtual void process(uint16_t data)=0
float get_setup_priority() const override
void set_max_touch_channel(uint8_t max_touch_channel)
void register_channel(MPR121Channel *channel)
uint8_t get_release_threshold() const
const float IO
For components that represent GPIO pins like PCF8573.
uint8_t get_touch_threshold() const
void set_pin(uint8_t pin)
Implementation of SPI Controller mode.
Helper class to expose a MPR121 pin as an internal input GPIO pin.
void set_parent(MPR121Component *parent)
This Class provides the methods to read/write bytes from/to an i2c device.
void set_inverted(bool inverted)