1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-13 14:20:29 +01:00

Merge pull request #5 from p1ngb4ck/dev

Dev
This commit is contained in:
Oliver Kleinecke 2025-02-09 12:27:03 +01:00 committed by GitHub
commit 361313c2df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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: