1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-28 08:02:23 +01:00

Update mcp4461.cpp

This commit is contained in:
Oliver Kleinecke
2025-02-03 23:32:46 +01:00
committed by GitHub
parent 9b6d4cd5e5
commit f8c9b73150

View File

@@ -345,7 +345,7 @@ void Mcp4461Component::disable_terminal(MCP4461WiperIdx wiper, char terminal) {
this->update_ = true; this->update_ = true;
} }
uint16_t Mcp4461Component::get_eeprom_value(MCP4461EEPRomLocation location) { uint16_t Mcp4461Component::get_eeprom_value(Mcp4461EeepromLocation location) {
uint8_t reg = 0; uint8_t reg = 0;
reg |= static_cast<uint8_t>(MCP4461_EEPROM_1 + (static_cast<uint8_t>(location) * 0x10)); reg |= static_cast<uint8_t>(MCP4461_EEPROM_1 + (static_cast<uint8_t>(location) * 0x10));
reg |= static_cast<uint8_t> Mcp4461Commands::READ; reg |= static_cast<uint8_t> Mcp4461Commands::READ;
@@ -358,7 +358,7 @@ uint16_t Mcp4461Component::get_eeprom_value(MCP4461EEPRomLocation location) {
return buf; return buf;
} }
void Mcp4461Component::set_eeprom_value(MCP4461EEPRomLocation location, uint16_t value) { void Mcp4461Component::set_eeprom_value(Mcp4461EeepromLocation location, uint16_t value) {
uint8_t addr = 0; uint8_t addr = 0;
if (value > 511) { if (value > 511) {
return; return;