mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	| @@ -669,13 +669,13 @@ bool Mcp4461Component::is_eeprom_ready_for_writing_(bool wait_if_not_ready) { | ||||
|  | ||||
|   /* Timestamp before starting the loop */ | ||||
|   const uint32_t start_millis = millis(); | ||||
|    | ||||
|  | ||||
|   ESP_LOGV(TAG, "Waiting until EEPROM is ready for write, start_millis = %" PRIu32, start_millis); | ||||
|  | ||||
|   /* Loop until EEPROM is ready or timeout is reached */ | ||||
|   while (!ready_for_write && ((millis() - start_millis) < EEPROM_WRITE_TIMEOUT_MS)) { | ||||
|     ready_for_write = !this->is_writing_(); | ||||
|      | ||||
|  | ||||
|     /* If ready, exit early */ | ||||
|     if (ready_for_write) { | ||||
|       ESP_LOGV(TAG, "EEPROM is ready for new write, elapsed_millis = %" PRIu32, millis() - start_millis); | ||||
|   | ||||
| @@ -98,10 +98,10 @@ class Mcp4461Component : public Component, public i2c::I2CDevice { | ||||
|     MCP4461_STATUS_REGISTER_ERROR,   // Error fetching status register | ||||
|     MCP4461_PARENT_FAILED,           // Parent component failed | ||||
|     MCP4461_VALUE_INVALID,           // Invalid value given for wiper / eeprom | ||||
|     MCP4461_WRITE_PROTECTED,         // The value was read, but the CRC over the payload (valid and data) does not match | ||||
|     MCP4461_WIPER_ENABLED,           // The wiper is enabled, discard additional enabling actions | ||||
|     MCP4461_WIPER_DISABLED,          // The wiper is disabled - all actions for this wiper will be aborted/discarded | ||||
|     MCP4461_WIPER_LOCKED,            // The wiper is locked using WiperLock-technology - all actions for this wiper will be aborted/discarded | ||||
|     MCP4461_WRITE_PROTECTED,  // The value was read, but the CRC over the payload (valid and data) does not match | ||||
|     MCP4461_WIPER_ENABLED,    // The wiper is enabled, discard additional enabling actions | ||||
|     MCP4461_WIPER_DISABLED,   // The wiper is disabled - all actions for this wiper will be aborted/discarded | ||||
|     MCP4461_WIPER_LOCKED,     // The wiper is locked using WiperLock-technology - all actions for this wiper will be aborted/discarded | ||||
|   } error_code_{MCP4461_STATUS_OK}; | ||||
|  | ||||
|  protected: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user