TauLabs/TauLabs — pull request #1396 by peabody124 (2014-11-15 22:57:15+00:00)
Title: Streamfs - ring buffer style file system for flash

This provides a simple file system that can be used with flash chips for logging or
writing large binary blobs that are not appropriate with the current setting-oriented
file system (e.g. for OTA updates)

It always writes in a circular manner through the flash, overwriting the oldest file or
eventually the beginning of the current file. When a new file is opened it is given a
file_id greater than the maximum previous one.

The direct API that is most useful is:
- PIOS_STREAMFS_OpenWrite - creates a file to write to
- PIOS_STREAMFS_OpenRead - opens a file to read from
- PIOS_STREAMFS_Close - closes the existing file
- PIOS_STREAMFS_Format - erase the whole filesystem

Then when a file is open you can use either
- PIOS_COM_SendBuffer
- PIOS_COM_ReceiveBuffer

To stream from the file systems.

This also includes unit test coverage of the file system which demonstrates writing and reading.