[Tinyos-help] What do PageEEPROM's flush and sync do?

David Gay dgay42 at gmail.com
Tue Feb 6 09:55:47 PST 2007


On 2/6/07, Jacob Sorber <jacob.sorber at gmail.com> wrote:
> I am seeing some bizarre behavior, and I suspect that it is due to my not
> understanding exactly what these two functions do.  I have not been able to
> find any documentation on the subject, so any help would be great.

flush starts writing the specified page to flash and signals
completion "immediiately" (well, before the write completes). sync
does the same thing, but only signals completion when the write is
complete.

Note that the pages are handled like a cache, so may be flushed anyway
because of subsequent reads or writes. But if you want to ensure data
is written, you do need to call sync or flush.

David Gay


More information about the Tinyos-help mailing list