UFLASH File System. More...
Go to the source code of this file.
Defines | |
#define | UFLASH_BLOCK_UNITS 4 |
Max. number of blocks per file system. | |
#define | UFLASH_ENTRIES 128 |
Number of file system entries. | |
#define | UFLASH_USAGE_CACHE 32 |
Size of the least used buffer. | |
#define | UFLASH_MAX_PATH 0 |
Maximum lenght of a full absolute path. | |
#define | UFLASH_BLOCK_INVALID ((blknum_t)-1) |
#define | UFLASH_VOLF_FIXED 0x80 |
Typedefs | |
typedef uint8_t | blknum_t |
typedef uint_fast8_t | blknum_fast_t |
Functions | |
int | UFlashAttach (NUTDEVICE *dev, NUTSERIALFLASH *sfi, NUTSPIBUS *bus) |
Attach an UFLASH file system to a serial flash device. | |
void | UFlashDetach (NUTDEVICE *dev) |
Detach an UFLASH file system from a serial flash device. | |
int | UFlashFormat (NUTDEVICE *dev, NUTSERIALFLASH *sfi, NUTSPIBUS *bus) |
Format an UFLASH volume. | |
Variables | |
NUTDEVICE | devUFlash0 |
UFLASH0 file system device. | |
NUTDEVICE | devUFlash1 |
UFLASH1 file system device. |
UFLASH File System.
The UFLASH file system has been specifically designed for serial flash memory chips used on tiny embedded systems.
Such memory chips do not allow to program single bytes. Instead, only full pages can be programmed. On the other hand, these chips provide one or two integrated RAM buffers. They allow to modify single bytes without transfering full pages between the memory chip and the microcontroller's RAM.
Although no mechanism has been implemented to replace worn out pages, the file system maintains a very well balanced wear levelling. This includes regular movement of static files.
Furthermore, previously unfinished write accesses are automatically detected and reverted when mounting a volume. However, this features still needs to be tested more thoroughly.
Note, that directories do not really exist in the UFLASH file system. They are mimicked in a limited way. When scanning a directory, all subdirectories will appear again for each file they contain.
* $Id$ *
Definition in file uflashfs.c.