Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

RE: fx_file_open fails to open file

$
0
0

Karol,

I am using the channel 0, my interrupts settings are:

My configuration is:

The situation is the following:

  • I create the file:

status = fx_file_create(&g_fx_media0, (CHAR *)nomeFile);

  • Write something on the file.dat (I tryied with a struct, a string, ecc..):

status = fx_file_open(&g_fx_media0, &g_my_file, (CHAR *)nomeFile, FX_OPEN_FOR_WRITE);

status = fx_file_write(&g_my_file, &var, sizeof(var));

status = fx_file_close(&g_my_file);

status = fx_media_flush(&g_fx_media0);

"var" is actually written onto the file.
When I read the file, I am able to read correctly the "var" variable. The problem is that I cannot write anymore on the file, even if I call the same routines shown above, which written well the first time).

The reading routines are:

status = fx_file_open(&g_fx_media0, &g_my_file, (CHAR *)nomeFile, FX_OPEN_FOR_READ );

status = fx_file_read(&g_my_file, &var, sizeof(vardascrivere), &tmp);

status = fx_file_close(&g_my_file);

status = fx_media_flush(&g_fx_media0);


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>