8static const char *
const TAG =
"cap1188";
47 uint8_t sensitivity = 0;
49 sensitivity = sensitivity & 0x0f;
66 ESP_LOGCONFIG(TAG,
"CAP1188:");
71 " Manufacture ID: 0x%x\n"
75 switch (this->error_code_) {
77 ESP_LOGE(TAG,
"Product ID or Manufacture ID of the connected device does not match a known CAP1188.");
99 channel->process(touched);
virtual void mark_failed()
Mark this component as failed.
void enable_loop()
Enable this component's loop.
void disable_loop()
Disable this component's loop.
void set_timeout(const std::string &name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a unique name.
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) const
writes an array of bytes to a specific register in the I²C device
bool write_byte(uint8_t a_register, uint8_t data) const
bool read_byte(uint8_t a_register, uint8_t *data)
ErrorCode read_register(uint8_t a_register, uint8_t *data, size_t len)
reads an array of bytes from a specific register in the I²C device
@ CAP1188_STAND_BY_CONFIGURATION
@ CAP1188_SENSOR_INPUT_STATUS
Providing packet encoding functions for exchanging data with a remote host.