\hypertarget{nandfs_8h}{
\section{libdiskmii/include/diskmii/nandfs.h File Reference}
\label{nandfs_8h}\index{libdiskmii/include/diskmii/nandfs.h@{libdiskmii/include/diskmii/nandfs.h}}
}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structnandfs__fp}{nandfs\_\-fp}
\end{DoxyCompactItemize}
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\hypertarget{nandfs_8h_a91dc32da51d834a23d7b74ffe1df54f8}{
\#define {\bfseries NANDFS\_\-NAME\_\-LEN}~12}
\label{nandfs_8h_a91dc32da51d834a23d7b74ffe1df54f8}

\item 
\hypertarget{nandfs_8h_a6b152b3e1ff8a96de1ffb7583eee1530}{
\#define {\bfseries NANDFS\_\-SEEK\_\-SET}~0}
\label{nandfs_8h_a6b152b3e1ff8a96de1ffb7583eee1530}

\item 
\hypertarget{nandfs_8h_aff562c78dabbe9952761d76b5ca7b7d3}{
\#define {\bfseries NANDFS\_\-SEEK\_\-CUR}~1}
\label{nandfs_8h_aff562c78dabbe9952761d76b5ca7b7d3}

\item 
\hypertarget{nandfs_8h_ad2bcbe9959e4081513e7962bc7311330}{
\#define {\bfseries NANDFS\_\-SEEK\_\-END}~2}
\label{nandfs_8h_ad2bcbe9959e4081513e7962bc7311330}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
s32 \hyperlink{nandfs_8h_a0e8bd6ab085de2fa39a01fdf22514459}{nandfs\_\-initialize} (void)
\begin{DoxyCompactList}\small\item\em Initializes the NAND FS. \item\end{DoxyCompactList}\item 
u32 \hyperlink{nandfs_8h_ae734418e89d5505702cc83225f1d59fc}{nandfs\_\-get\_\-usage} (void)
\begin{DoxyCompactList}\small\item\em Gets what percentage of the NAND FS is used. \item\end{DoxyCompactList}\item 
s32 \hyperlink{nandfs_8h_ab5afcba4cf96aee9ae2e4875bf99f669}{nandfs\_\-open} (struct \hyperlink{structnandfs__fp}{nandfs\_\-fp} $\ast$fp, const char $\ast$path)
\begin{DoxyCompactList}\small\item\em Opens a NAND FS file for reading. \item\end{DoxyCompactList}\item 
s32 \hyperlink{nandfs_8h_af0ef31fd5d05d2534d6ae3787aab5f34}{nandfs\_\-read} (void $\ast$ptr, u32 size, u32 nmemb, struct \hyperlink{structnandfs__fp}{nandfs\_\-fp} $\ast$fp)
\begin{DoxyCompactList}\small\item\em Reads data from a file on the NAND FS. \item\end{DoxyCompactList}\item 
s32 \hyperlink{nandfs_8h_a318261772eaf548d66dfe00032f8a157}{nandfs\_\-seek} (struct \hyperlink{structnandfs__fp}{nandfs\_\-fp} $\ast$fp, s32 offset, u32 whence)
\begin{DoxyCompactList}\small\item\em Seeks to a position in a file. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
NAND filesystem interface. 

\subsection{Function Documentation}
\hypertarget{nandfs_8h_ae734418e89d5505702cc83225f1d59fc}{
\index{nandfs.h@{nandfs.h}!nandfs\_\-get\_\-usage@{nandfs\_\-get\_\-usage}}
\index{nandfs\_\-get\_\-usage@{nandfs\_\-get\_\-usage}!nandfs.h@{nandfs.h}}
\subsubsection[{nandfs\_\-get\_\-usage}]{\setlength{\rightskip}{0pt plus 5cm}u32 nandfs\_\-get\_\-usage (void)}}
\label{nandfs_8h_ae734418e89d5505702cc83225f1d59fc}


Gets what percentage of the NAND FS is used. 

\begin{DoxyReturn}{Returns}
The percentage of used blocks. 
\end{DoxyReturn}
\hypertarget{nandfs_8h_a0e8bd6ab085de2fa39a01fdf22514459}{
\index{nandfs.h@{nandfs.h}!nandfs\_\-initialize@{nandfs\_\-initialize}}
\index{nandfs\_\-initialize@{nandfs\_\-initialize}!nandfs.h@{nandfs.h}}
\subsubsection[{nandfs\_\-initialize}]{\setlength{\rightskip}{0pt plus 5cm}s32 nandfs\_\-initialize (void)}}
\label{nandfs_8h_a0e8bd6ab085de2fa39a01fdf22514459}


Initializes the NAND FS. 

\begin{DoxyReturn}{Returns}
0 on success, anything else is failure. 
\end{DoxyReturn}
\hypertarget{nandfs_8h_ab5afcba4cf96aee9ae2e4875bf99f669}{
\index{nandfs.h@{nandfs.h}!nandfs\_\-open@{nandfs\_\-open}}
\index{nandfs\_\-open@{nandfs\_\-open}!nandfs.h@{nandfs.h}}
\subsubsection[{nandfs\_\-open}]{\setlength{\rightskip}{0pt plus 5cm}s32 nandfs\_\-open (struct {\bf nandfs\_\-fp} $\ast$ {\em fp}, \/  const char $\ast$ {\em path})}}
\label{nandfs_8h_ab5afcba4cf96aee9ae2e4875bf99f669}


Opens a NAND FS file for reading. 


\begin{DoxyParams}{Parameters}
\item[{\em fp}]the file pointer to store the file information. \item[{\em path}]the path to the file to open. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, anything else is failure. 
\end{DoxyReturn}
\hypertarget{nandfs_8h_af0ef31fd5d05d2534d6ae3787aab5f34}{
\index{nandfs.h@{nandfs.h}!nandfs\_\-read@{nandfs\_\-read}}
\index{nandfs\_\-read@{nandfs\_\-read}!nandfs.h@{nandfs.h}}
\subsubsection[{nandfs\_\-read}]{\setlength{\rightskip}{0pt plus 5cm}s32 nandfs\_\-read (void $\ast$ {\em ptr}, \/  u32 {\em size}, \/  u32 {\em nmemb}, \/  struct {\bf nandfs\_\-fp} $\ast$ {\em fp})}}
\label{nandfs_8h_af0ef31fd5d05d2534d6ae3787aab5f34}


Reads data from a file on the NAND FS. 


\begin{DoxyParams}{Parameters}
\item[{\em ptr}]the memory to read into. \item[{\em size}]the size of each element to read. \item[{\em nmemb}]how many elements to read. \item[{\em fp}]the file pointer to read data from. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
How many bytes have been read. 
\end{DoxyReturn}
\hypertarget{nandfs_8h_a318261772eaf548d66dfe00032f8a157}{
\index{nandfs.h@{nandfs.h}!nandfs\_\-seek@{nandfs\_\-seek}}
\index{nandfs\_\-seek@{nandfs\_\-seek}!nandfs.h@{nandfs.h}}
\subsubsection[{nandfs\_\-seek}]{\setlength{\rightskip}{0pt plus 5cm}s32 nandfs\_\-seek (struct {\bf nandfs\_\-fp} $\ast$ {\em fp}, \/  s32 {\em offset}, \/  u32 {\em whence})}}
\label{nandfs_8h_a318261772eaf548d66dfe00032f8a157}


Seeks to a position in a file. 


\begin{DoxyParams}{Parameters}
\item[{\em fp}]the file pointer to seek in. \item[{\em offset}]the offset to seek. \item[{\em whence}]where to seek from. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, anything else is failure. 
\end{DoxyReturn}
