From 08bca8b276f205c51702869c912e5aedba6296d7 Mon Sep 17 00:00:00 2001 From: EgorShin <98223248+EgorShin@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:32:30 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F,=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8F=20update?= =?UTF-8?q?=20=D1=82=D1=80=D0=B5=D0=B1=D1=83=D0=B5=D1=82=20=D0=BE=D1=82?= =?UTF-8?q?=D0=BB=D0=B0=D0=B4=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libraries/EEPROM/src/EEPROM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/EEPROM/src/EEPROM.cpp b/libraries/EEPROM/src/EEPROM.cpp index fd9bd3c..bd15fdc 100644 --- a/libraries/EEPROM/src/EEPROM.cpp +++ b/libraries/EEPROM/src/EEPROM.cpp @@ -91,7 +91,7 @@ void EEPROMClass:: update( int idx, uint8_t val ) // uint8_t oldVal = (uint8_t)(( write_data_buf[word_idx] & (((uint32_t)0xFF) << ((EEPROM_WORD_SIZE - byte_idx - 1) * 8)) ) >> ((EEPROM_WORD_SIZE - byte_idx - 1) * 8)); uint8_t oldVal = (uint8_t)(*((uint8_t*)write_data_buf + word_idx + (EEPROM_WORD_SIZE - byte_idx - 1))); // Проверка того, что записанный байт отличается от нового - if( oldVal != val ) + if(oldVal != val) { // Очистка нужной страницы HAL_EEPROM_Erase(&heeprom, (uint16_t)addr, EEPROM_PAGE_WORDS, HAL_EEPROM_WRITE_SINGLE, EEPROM_OP_TIMEOUT);