1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-28 21:48:16 +00:00

Update mcp4461.cpp

This commit is contained in:
Oliver Kleinecke 2025-02-06 15:00:35 +01:00 committed by GitHub
parent 2b78e90256
commit c1ca965e22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -465,7 +465,7 @@ bool Mcp4461Component::is_eeprom_busy_() {
return false;
}
void Mcp4461Component::mcp4461_write_(uint8_t addr, uint16_t data, bool nonvolatile) {
bool Mcp4461Component::mcp4461_write_(uint8_t addr, uint16_t data, bool nonvolatile) {
uint8_t reg = 0;
if (data > 0xFF) {
reg = 1;
@ -484,7 +484,8 @@ void Mcp4461Component::mcp4461_write_(uint8_t addr, uint16_t data, bool nonvolat
return;
}
this->previous_write_exec_time_ = millis();
this->write_byte(reg, value_byte);
auto err = this->write_byte(reg, value_byte);
return err;
}
}
} // namespace mcp4461