Windows inserted \r\n in the EEPROM!

This commit is contained in:
Bertrand Songis
2014-02-20 12:10:26 +01:00
parent 4a9e8d6a4b
commit 0db90e34c3
+3 -3
View File
@@ -365,9 +365,9 @@ void StartEepromThread(const char *filename)
{
eepromFile = filename;
if (eepromFile) {
fp = fopen(eepromFile, "r+");
fp = fopen(eepromFile, "rb+");
if (!fp)
fp = fopen(eepromFile, "w+");
fp = fopen(eepromFile, "wb+");
if (!fp) perror("error in fopen");
}
#ifdef __APPLE__
@@ -495,7 +495,7 @@ FRESULT f_open (FIL * fil, const TCHAR *name, BYTE flag)
return FR_INVALID_NAME;
fil->fsize = tmp.st_size;
}
fil->fs = (FATFS*)fopen(path, (flag & FA_WRITE) ? "w+" : "r+");
fil->fs = (FATFS*)fopen(path, (flag & FA_WRITE) ? "wb+" : "rb+");
return FR_OK;
}