nandfs.h File Reference

Go to the source code of this file.

Data Structures

struct  nandfs_fp

Defines

#define NANDFS_NAME_LEN   12
#define NANDFS_SEEK_SET   0
#define NANDFS_SEEK_CUR   1
#define NANDFS_SEEK_END   2

Functions

s32 nandfs_initialize (void)
 Initializes the NAND FS.
u32 nandfs_get_usage (void)
 Gets what percentage of the NAND FS is used.
s32 nandfs_open (struct nandfs_fp *fp, const char *path)
 Opens a NAND FS file for reading.
s32 nandfs_read (void *ptr, u32 size, u32 nmemb, struct nandfs_fp *fp)
 Reads data from a file on the NAND FS.
s32 nandfs_seek (struct nandfs_fp *fp, s32 offset, u32 whence)
 Seeks to a position in a file.

Detailed Description

NAND filesystem interface.


Function Documentation

u32 nandfs_get_usage ( void   ) 

Gets what percentage of the NAND FS is used.

Returns:
The percentage of used blocks.
s32 nandfs_initialize ( void   ) 

Initializes the NAND FS.

Returns:
0 on success, anything else is failure.
s32 nandfs_open ( struct nandfs_fp fp,
const char *  path 
)

Opens a NAND FS file for reading.

Parameters:
fp the file pointer to store the file information.
path the path to the file to open.
Returns:
0 on success, anything else is failure.
s32 nandfs_read ( void *  ptr,
u32  size,
u32  nmemb,
struct nandfs_fp fp 
)

Reads data from a file on the NAND FS.

Parameters:
ptr the memory to read into.
size the size of each element to read.
nmemb how many elements to read.
fp the file pointer to read data from.
Returns:
How many bytes have been read.
s32 nandfs_seek ( struct nandfs_fp fp,
s32  offset,
u32  whence 
)

Seeks to a position in a file.

Parameters:
fp the file pointer to seek in.
offset the offset to seek.
whence where to seek from.
Returns:
0 on success, anything else is failure.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated by  doxygen 1.6.3