8 static const char *
const TAG =
"mpr121";
11 ESP_LOGCONFIG(TAG,
"Setting up MPR121...");
24 channel->touch_threshold_.value_or(this->touch_threshold_));
26 channel->release_threshold_.value_or(this->release_threshold_));
52 uint8_t mask = debounce << 4;
58 uint8_t mask = debounce & 0x0f;
64 ESP_LOGCONFIG(TAG,
"MPR121:");
66 switch (this->error_code_) {
68 ESP_LOGE(TAG,
"Communication with MPR121 failed!");
71 ESP_LOGE(TAG,
"MPR121 has wrong default value for CONFIG2?");
83 uint8_t lsb = val >> 8;
85 val = (uint16_t(msb) << 8) | lsb;
88 channel->process(val);
bool read_byte_16(uint8_t a_register, uint16_t *data)
void set_release_debounce(uint8_t debounce)
enum esphome::mpr121::MPR121Component::ErrorCode NONE
std::vector< MPR121Channel * > channels_
bool write_byte(uint8_t a_register, uint8_t data, bool stop=true)
virtual void mark_failed()
Mark this component as failed.
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
void dump_config() override
void IRAM_ATTR HOT delay(uint32_t ms)
void set_touch_debounce(uint8_t debounce)