Originally Posted by Anatoly
Is it a secret question to be asked in public forum?
I got FR_OK on f_mount but
f_open(&MyFile, "test.txt", FA_READ); I got FR_INVALID_OBJECT
What do I miss here ?
FRESULT fr; /* FatFs return code */
char line; /* Line buffer */
uint32_t wbytes; /* File write counts */
uint8_t wtext = "text to write logical disk"; /* File write buffer */
f_mount(&mynewdiskFatFs, (TCHAR const*)mynewdiskPath, 0);
/* Open a text file */
f_open(&MyFile, "STM32.TXT", FA_CREATE_ALWAYS | FA_WRITE);
f_write(&MyFile, wtext, sizeof(wtext), (void *)&wbytes);