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. |
#define UFLASH_BLOCK_UNITS 4 |
Max. number of blocks per file system.
Number of units per block.
Definition at line 106 of file uflashfs.c.
#define UFLASH_ENTRIES 128 |
Number of file system entries.
Definition at line 111 of file uflashfs.c.
#define UFLASH_USAGE_CACHE 32 |
Size of the least used buffer.
Definition at line 116 of file uflashfs.c.
#define UFLASH_MAX_PATH 0 |
Maximum lenght of a full absolute path.
If not defined, a variable path name length is used. Note, that the total size of the name is still limited, because the block header and the entry header must fit into the first unit of the file system block.
Definition at line 138 of file uflashfs.c.
#define UFLASH_BLOCK_INVALID ((blknum_t)-1) |
Definition at line 141 of file uflashfs.c.
#define UFLASH_VOLF_FIXED 0x80 |
Definition at line 225 of file uflashfs.c.
Definition at line 120 of file uflashfs.c.
typedef uint_fast8_t blknum_fast_t |
Definition at line 121 of file uflashfs.c.
int UFlashAttach | ( | NUTDEVICE * | dev, | |
NUTSERIALFLASH * | sfi, | |||
NUTSPIBUS * | bus | |||
) |
Attach an UFLASH file system to a serial flash device.
This function will initialize the hardware and mount the volume.
dev | Specifies the file system device. | |
sfi | Specifies the serial flash interface. | |
bus | Specifies the SPI bus driver. |
Definition at line 1844 of file uflashfs.c.
References NUTASSERT, and NutEventPost().
void UFlashDetach | ( | NUTDEVICE * | dev | ) |
Detach an UFLASH file system from a serial flash device.
This function will unmount the volume and release all occupied resources.
dev | Specifies the file system device. |
Definition at line 1879 of file uflashfs.c.
References NUTASSERT.
int UFlashFormat | ( | NUTDEVICE * | dev, | |
NUTSERIALFLASH * | sfi, | |||
NUTSPIBUS * | bus | |||
) |
Format an UFLASH volume.
Formatting an UFLASH volume is easy: All blocks are simply erased. Therefore, formatting is required only to remove existing contents, which is incompatible with the current format options. The caller must make sure, that the volume is not mounted.
dev | Specifies the file system device. | |
sfi | Specifies the serial flash interface. | |
bus | Specifies the SPI bus driver. |
Definition at line 1907 of file uflashfs.c.
References NUTASSERT, and NutEventPost().
NUTDEVICE devUFlash0 |
{ 0, {'U', 'F', 'L', 'A', 'S', 'H', '0', 0, 0} , IFTYP_FS, 0, 0, NULL, NULL, UFlashInit, UFlashIOCtl, UFlashFileRead, UFlashFileWrite, UFlashFileWrite_P, UFlashFileOpen, UFlashFileClose, UFlashFileSize }
UFLASH0 file system device.
Definition at line 2041 of file uflashfs.c.
NUTDEVICE devUFlash1 |
{ 0, {'U', 'F', 'L', 'A', 'S', 'H', '1', 0, 0} , IFTYP_FS, 1, 0, NULL, NULL, UFlashInit, UFlashIOCtl, UFlashFileRead, UFlashFileWrite, UFlashFileWrite_P, UFlashFileOpen, UFlashFileClose, UFlashFileSize }
UFLASH1 file system device.
Definition at line 2065 of file uflashfs.c.