mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 06:33:51 +00:00 
			
		
		
		
	Update mcp4461.cpp
This commit is contained in:
		| @@ -22,7 +22,7 @@ void Mcp4461Component::setup() { | ||||
|  | ||||
| void Mcp4461Component::begin_() { | ||||
|   // save WP/WL status | ||||
|   this->set_write_protection_status_(); | ||||
|   this->update_write_protection_status_(); | ||||
|   for (uint8_t i = 0; i < 8; i++) { | ||||
|     if (this->reg_[i].initial_value.has_value()) { | ||||
|       uint16_t initial_state; | ||||
| @@ -76,7 +76,7 @@ void Mcp4461Component::set_initial_value(Mcp4461WiperIdx wiper, float initial_va | ||||
|   this->reg_[wiper_id].initial_value = initial_value; | ||||
| } | ||||
|  | ||||
| void Mcp4461Component::set_write_protection_status_() { | ||||
| void Mcp4461Component::update_write_protection_status_() { | ||||
|   uint8_t status_register_value; | ||||
|   status_register_value = this->get_status_register(); | ||||
|   this->write_protected_ = static_cast<bool>((status_register_value >> 0) & 0x01); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user