From db1bcc2ffef48b85eb0faad804f9e8f456874d6e Mon Sep 17 00:00:00 2001 From: Oliver Kleinecke Date: Tue, 4 Feb 2025 10:14:09 +0100 Subject: [PATCH] Update mcp4461.cpp --- esphome/components/mcp4461/mcp4461.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/mcp4461/mcp4461.cpp b/esphome/components/mcp4461/mcp4461.cpp index de196bd354..0105bc0c92 100644 --- a/esphome/components/mcp4461/mcp4461.cpp +++ b/esphome/components/mcp4461/mcp4461.cpp @@ -345,7 +345,7 @@ void Mcp4461Component::disable_terminal(Mcp4461WiperIdx wiper, char terminal) { uint16_t Mcp4461Component::get_eeprom_value(Mcp4461EepromLocation location) { uint8_t reg = 0; - reg |= static_cast(Mcp4461EepromLocation::MCP4461_EEPROM_1 + (static_cast(location) * 0x10)); + reg |= static_cast(Mcp4461EepromLocation::MCP4461_EEPROM_1) + (static_cast(location) * 0x10); reg |= static_cast(Mcp4461Commands::READ); uint16_t buf; if (!this->read_byte_16(reg, &buf)) { @@ -364,7 +364,7 @@ void Mcp4461Component::set_eeprom_value(Mcp4461EepromLocation location, uint16_t if (value > 256) { addr = 1; } - addr |= static_cast(Mcp4461EepromLocation::MCP4461_EEPROM_1 + (static_cast(location) * 0x10)); + addr |= static_cast(Mcp4461EepromLocation::MCP4461_EEPROM_1) + (static_cast(location) * 0x10); this->mcp4461_write_(addr, value, true); }