|
@@ -64,11 +64,11 @@ static char HAL_STM32F1_eeprom_content[HAL_STM32F1_EEPROM_SIZE];
|
64
|
64
|
if (!card.isDetected()) return false;
|
65
|
65
|
|
66
|
66
|
SdFile file, root = card.getroot();
|
67
|
|
- if (file.open(&root, EEPROM_FILENAME, O_CREAT | O_WRITE | O_TRUNC))
|
68
|
|
- return false;
|
69
|
|
-
|
70
|
|
- int16_t bytes_written = file.write(HAL_STM32F1_eeprom_content, HAL_STM32F1_EEPROM_SIZE);
|
71
|
|
- file.close();
|
|
67
|
+ int16_t bytes_written = 0;
|
|
68
|
+ if (file.open(&root, EEPROM_FILENAME, O_CREAT | O_WRITE | O_TRUNC)) {
|
|
69
|
+ bytes_written = file.write(HAL_STM32F1_eeprom_content, HAL_STM32F1_EEPROM_SIZE);
|
|
70
|
+ file.close();
|
|
71
|
+ }
|
72
|
72
|
return (bytes_written == HAL_STM32F1_EEPROM_SIZE);
|
73
|
73
|
}
|
74
|
74
|
|