7 static const char *
const TAG =
"mcp4725";
10 ESP_LOGCONFIG(TAG,
"Setting up MCP4725 (0x%02X)...", this->
address_);
11 auto err = this->
write(
nullptr, 0);
23 ESP_LOGE(TAG,
"Communication with MCP4725 failed!");
29 const uint16_t value = (uint16_t) round(state * (pow(2, MCP4725_RES) - 1));
void write_state(float state) override
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.
uint8_t address_
store the address of the device on the bus
virtual void mark_failed()
Mark this component as failed.
Implementation of SPI Controller mode.
bool write_byte_16(uint8_t a_register, uint16_t data)
void dump_config() override