7 static const char *
const TAG =
"as3935_i2c";
13 ESP_LOGW(TAG,
"read_byte failed - increase log level for more details!");
18 write_reg |= (bits << start_pos);
21 ESP_LOGW(TAG,
"write_byte failed - increase log level for more details!");
29 ESP_LOGW(TAG,
"Writing register failed!");
33 ESP_LOGW(TAG,
"Reading register failed!");
39 AS3935Component::dump_config();
bool read_byte(uint8_t a_register, uint8_t *data, bool stop=true)
I2CRegister reg(uint8_t a_register)
calls the I2CRegister constructor
void write_register(uint8_t reg, uint8_t mask, uint8_t bits, uint8_t start_position) override
ErrorCode read(uint8_t *data, size_t len)
reads an array of bytes from the device using an I2CBus
ErrorCode write(const uint8_t *data, size_t len, bool stop=true)
writes an array of bytes to a device using an I2CBus
No error found during execution of method.
void dump_config() override
bool write_byte(uint8_t a_register, uint8_t data, bool stop=true)
virtual void mark_failed()
Mark this component as failed.
Implementation of SPI Controller mode.
uint8_t read_register(uint8_t reg) override