8 years, 1 month ago.

How to immediately write data on a file (fflush() seems not works) and when data is written

I would like to find a way to write immediately a file for instance just after a write() or a fprintf(). I would like to use generic ANSI C functions like fopen(), fprintf() and fflush() or C++ file streams. I wouldn't like to use FileHandle or FATFileHandle or similar classes because I will manage also other file systems as Contiki Coffee so I need a generic way to handle files on whatever type of file system.

Seems that fflush() doesn't work and there is no entry in retarget.cpp for fflush(). I am using the 'old' mbed library.

Any idea?

Kind regards, Massimo

Be the first to answer this question.