Tool/software: Starterware
I am running the sample project "2045.starterware_c6748_mmcsd" on LCDKOMAPL138. Added the following code:
fresult = f_open(&g_sFileObject, g_cTmpBuf, (BYTE)FA_WRITE);
if(fresult != FR_OK)
{
return(fresult);
}
usBytesRead = 7;
strcpy(writeDatBuf, "testing");
fresult = f_write(&g_sFileObject, writeDatBuf, 7,
&usBytesRead);
if(fresult != FR_OK)
{
return(fresult);
}
The f_open() and f_write() always report FR_OK. However, the data was not written into the file (txt file). The f_read() work fine and read back the correct data every time. Please advise.
Thanks.