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:
parent
2b78e90256
commit
c1ca965e22
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user