58 uint8_t mask = debounce << 4;
64 uint8_t mask = debounce & 0x0f;
70 ESP_LOGCONFIG(TAG,
"MPR121:");
78 channel->process(
val);
86 const uint8_t ionum = pin - 4;
96 const uint8_t ionum = pin - 4;
void mark_failed()
Mark this component as failed.
bool status_comm_result(bool ok)
Clears the warning when ok, else sets it with message (default "Communication failed"); returns ok.
void enable_loop()
Enable this component's loop.
void set_timeout(const char *name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a const char* name.
void disable_loop()
Disable this component's loop.
bool write_byte(uint8_t a_register, uint8_t data) const
bool read_byte(uint8_t a_register, uint8_t *data)
bool read_byte_16_le(uint8_t a_register, uint16_t *data)
Read a 16-bit value stored least significant byte first.
uint8_t gpio_enable_
The enable mask - zero means high Z, 1 means GPIO usage.
void set_release_debounce(uint8_t debounce)
uint8_t gpio_direction_
Mask for the pin mode - 1 means output, 0 means input.
std::vector< MPR121Channel * > channels_
uint8_t gpio_output_
The mask to write as output state - 1 means HIGH, 0 means LOW.
void dump_config() override
bool digital_read(uint8_t pin)
void pin_mode(uint8_t pin, gpio::Flags flags)
uint8_t gpio_input_
The mask to read as input state - 1 means HIGH, 0 means LOW.
void digital_write(uint8_t pin, bool value)
void set_touch_debounce(uint8_t debounce)
uint8_t max_touch_channel_
ESPHOME_LOG_TAG(TAG, "mpr121")