From e1942715ce50a6ca6ed593d66ada928455965a79 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 2 Aug 2019 05:36:00 -0500 Subject: [PATCH] HAL_STM32F1_EEPROM_SIZE => HAL_EEPROM_SIZE --- .../HAL/HAL_STM32F1/persistent_store_sdcard.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp b/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp index 5bfcf9f7f..85b6fb4a6 100644 --- a/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp @@ -36,10 +36,10 @@ #ifndef E2END #define E2END 0xFFF // 4KB #endif -#define HAL_STM32F1_EEPROM_SIZE (E2END + 1) +#define HAL_EEPROM_SIZE (E2END + 1) #define _ALIGN(x) __attribute__ ((aligned(x))) // SDIO uint32_t* compat. -static char _ALIGN(4) HAL_eeprom_data[HAL_STM32F1_EEPROM_SIZE]; +static char _ALIGN(4) HAL_eeprom_data[HAL_EEPROM_SIZE]; #if ENABLED(SDSUPPORT) @@ -54,9 +54,9 @@ static char _ALIGN(4) HAL_eeprom_data[HAL_STM32F1_EEPROM_SIZE]; if (!file.open(&root, EEPROM_FILENAME, O_RDONLY)) return false; - int bytes_read = file.read(HAL_eeprom_data, HAL_STM32F1_EEPROM_SIZE); + int bytes_read = file.read(HAL_eeprom_data, HAL_EEPROM_SIZE); if (bytes_read < 0) return false; - for (; bytes_read < HAL_STM32F1_EEPROM_SIZE; bytes_read++) + for (; bytes_read < HAL_EEPROM_SIZE; bytes_read++) HAL_eeprom_data[bytes_read] = 0xFF; file.close(); return true; @@ -68,10 +68,10 @@ static char _ALIGN(4) HAL_eeprom_data[HAL_STM32F1_EEPROM_SIZE]; SdFile file, root = card.getroot(); int bytes_written = 0; if (file.open(&root, EEPROM_FILENAME, O_CREAT | O_WRITE | O_TRUNC)) { - bytes_written = file.write(HAL_eeprom_data, HAL_STM32F1_EEPROM_SIZE); + bytes_written = file.write(HAL_eeprom_data, HAL_EEPROM_SIZE); file.close(); } - return (bytes_written == HAL_STM32F1_EEPROM_SIZE); + return (bytes_written == HAL_EEPROM_SIZE); } #else // !SDSUPPORT @@ -98,7 +98,7 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uin return false; } -size_t PersistentStore::capacity() { return HAL_STM32F1_EEPROM_SIZE; } +size_t PersistentStore::capacity() { return HAL_EEPROM_SIZE; } #endif // EEPROM_SETTINGS