8static const char *
const TAG =
"cap1188";
11 ESP_LOGCONFIG(TAG,
"Setting up CAP1188...");
36 uint8_t sensitivity = 0;
38 sensitivity = sensitivity & 0x0f;
52 ESP_LOGCONFIG(TAG,
"CAP1188:");
59 switch (this->error_code_) {
61 ESP_LOGE(TAG,
"Product ID or Manufacture ID of the connected device does not match a known CAP1188.");
77 data = data & ~CAP1188_MAIN_INT;
83 channel->process(touched);
virtual void mark_failed()
Mark this component as failed.
virtual void digital_write(bool value)=0
void dump_config() override
uint8_t cap1188_product_id_
enum esphome::cap1188::CAP1188Component::ErrorCode NONE
uint8_t cap1188_manufacture_id_
uint8_t allow_multiple_touches_
uint8_t cap1188_revision_
std::vector< CAP1188Channel * > channels_
ErrorCode write_register(uint8_t a_register, const uint8_t *data, size_t len, bool stop=true)
writes an array of bytes to a specific register in the I²C device
bool write_byte(uint8_t a_register, uint8_t data, bool stop=true)
ErrorCode read_register(uint8_t a_register, uint8_t *data, size_t len, bool stop=true)
reads an array of bytes from a specific register in the I²C device
bool read_byte(uint8_t a_register, uint8_t *data, bool stop=true)
@ CAP1188_STAND_BY_CONFIGURATION
@ CAP1188_SENSOR_INPUT_STATUS
Providing packet encoding functions for exchanging data with a remote host.
void IRAM_ATTR HOT delay(uint32_t ms)