mirror of
https://github.com/esphome/esphome.git
synced 2025-04-08 03:40:28 +01:00
Update mcp4461.cpp
This commit is contained in:
parent
9b6d4cd5e5
commit
f8c9b73150
@ -345,7 +345,7 @@ void Mcp4461Component::disable_terminal(MCP4461WiperIdx wiper, char terminal) {
|
||||
this->update_ = true;
|
||||
}
|
||||
|
||||
uint16_t Mcp4461Component::get_eeprom_value(MCP4461EEPRomLocation location) {
|
||||
uint16_t Mcp4461Component::get_eeprom_value(Mcp4461EeepromLocation location) {
|
||||
uint8_t reg = 0;
|
||||
reg |= static_cast<uint8_t>(MCP4461_EEPROM_1 + (static_cast<uint8_t>(location) * 0x10));
|
||||
reg |= static_cast<uint8_t> Mcp4461Commands::READ;
|
||||
@ -358,7 +358,7 @@ uint16_t Mcp4461Component::get_eeprom_value(MCP4461EEPRomLocation location) {
|
||||
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;
|
||||
if (value > 511) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user