7 static const char *
const TAG =
"ina2xx_i2c";
10 auto err = this->
write(
nullptr, 0);
19 INA2XX::dump_config();
26 ESP_LOGE(TAG,
"read_ina_register_ failed. Reg=0x%02X Err=%d", reg, ret);
34 ESP_LOGE(TAG,
"write_register failed. Reg=0x%02X Err=%d", reg, ret);
bool read_ina_register(uint8_t reg, uint8_t *data, size_t len) override
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
I2CRegister reg(uint8_t a_register)
calls the I2CRegister constructor
bool write_ina_register(uint8_t reg, const uint8_t *data, size_t len) override
ErrorCode write(const uint8_t *data, size_t len, bool stop=true)
writes an array of bytes to a device using an I2CBus
void dump_config() override
No error found during execution of method.
virtual void mark_failed()
Mark this component as failed.
Implementation of SPI Controller mode.
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