aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/petitfs-0.03/doc/pf
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/petitfs-0.03/doc/pf')
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/appnote.html91
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/dinit.html40
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/dreadp.html59
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/dwritep.html73
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/filename.html22
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/lseek.html79
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/mount.html65
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/open.html103
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/opendir.html72
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/read.html73
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/readdir.html100
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/sdir.html30
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/sfatfs.html39
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/sfileinfo.html62
-rw-r--r--3rdparty/petitfs-0.03/doc/pf/write.html86
15 files changed, 994 insertions, 0 deletions
diff --git a/3rdparty/petitfs-0.03/doc/pf/appnote.html b/3rdparty/petitfs-0.03/doc/pf/appnote.html
new file mode 100644
index 00000000..68df279d
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/appnote.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs Module Application Note</title>
+</head>
+
+<body>
+<h1>Petit FatFs Module Application Note</h1>
+<hr>
+
+<h3>Basic Considerations</h3>
+<p>The FatFs module is assuming following conditions on portability.</p>
+<ul>
+<li>ANSI C<br>
+The FatFs module is a middleware written in ANSI C (C89). There is no platform dependence, so long as the compiler is in compliance with ANSI C.</li>
+<li>Size of integer types<br>
+The FatFs module assumes that size of char/short/long are 8/16/32 bit and int is 16 or 32 bit. These correspondence are defined in <tt>integer.h</tt>. This will not be a problem on most compilers. When any conflict with existing definitions is occured, you must resolve it with care.</li>
+</ul>
+</div>
+
+<div class="para">
+<h3>Memory Usage (R0.03)</h3>
+<table class="lst2">
+<tr><th></th><th>AVR</th><th>x86</th></tr>
+<tr><td>Compiler</td><td>gcc(WinAVR)</td><td>VC6</td></tr>
+<tr><td>_WORD_ACCESS</td><td>1</td><td>1</td></tr>
+<tr class="lst3"><td>Code (default)</td><td>2100</td><td>1720</td></tr>
+<tr><td>Code (!_USE_READ)</td><td>-444</td><td>-246</td></tr>
+<tr><td>Code (_USE_DIR)</td><td>+1002</td><td>+420</td></tr>
+<tr><td>Code (_USE_LSEEK)</td><td>+490</td><td>+228</td></tr>
+<tr><td>Code (_USE_WRITE)</td><td>+518</td><td>+351</td></tr>
+<tr><td>RAM (bss)</td><td>2</td><td>4</td></tr>
+<tr><td>RAM (work)</td><td>42</td><td>44</td></tr>
+</table>
+<p>This is the size of the Petit FatFs module itself. In addition to this, a low level disk I/O module will be required for a complete function. The size of MMC/SDC module on AVR becomes approximate 620 bytes without write function and 840 bytes with write function.</p>
+</div>
+
+<div class="para">
+<h3>Module Size Reduction</h3>
+<p>Follwing table shows which function is removed by configuration options for the module size reduction.</p>
+<table class="lst2">
+<tr><td rowspan="2">Function</td><td>_USE_READ</td><td>_USE_DIR</td><td>_USE_LSEEK</td><td>_USE_WRITE</td></tr>
+<tr><td>0</td><td>0</td><td>0</td><td>0</td></tr>
+<tr class="lst3"><td>pf_mount</td><td></td><td></td><td></td><td></td></tr>
+<tr><td>pf_open</td><td></td><td></td><td></td><td></td></tr>
+<tr><td>pf_read</td><td>x</td><td></td><td></td><td></td></tr>
+<tr><td>pf_lseek</td><td></td><td></td><td>x</td><td></td></tr>
+<tr><td>pf_opendir</td><td></td><td>x</td><td></td><td></td></tr>
+<tr><td>pf_readdir</td><td></td><td>x</td><td></td><td></td></tr>
+<tr><td>pf_write</td><td></td><td></td><td></td><td>x</td></tr>
+</table>
+</div>
+
+<div class="para">
+<h3>Performance effective file access</h3>
+<p>For good performance on reading a file on the small embedded system, application programmer should consider what process is done in the file system module.</p>
+<p>The Petit FatFs reads the disk sectors without a sector buffer. This means the file system reads a part of the sector contains the required data every reference point even if they are in the same sector. However the generic storage device are not byte addressable so that the disk I/O layer will read the entire sector and pick up the data bytes from the read data steram.</p>
+<p>When read 512 byte data from a file at a time, the data sector will be read only a time. When read that data in byte-by-byte, the data sector will be read 512 times. Therefore the byte-by-byte read request will <a href="../img/rwtest3.png">drastically decrease</a> the read performance. To avoid this stupid read controls, the file data should be read in long block as possible. Sector alignment access is not impotant on the Petit FatFs.</p>
+<p>The tiny microcontrollers targeted by Petit FatFs has a limited size of RAM. It may not able to allocate a certain size of read buffer and most type of text processing will require byte-by-byte read operation. The Petit FatFs supports data forwarding feature for such purpose.</p>
+
+</div>
+
+<div class="para">
+<h3>About FatFs License</h3>
+<p>Petit FatFs has being developped as a personal project of author, ChaN. It is free from the code anyone else wrote. Following code block shows a copy of the license document that included in the source files.</p>
+<pre>/*----------------------------------------------------------------------------/
+/ Petit FatFs - FAT file system module R0.03 (C)ChaN, 2014
+/-----------------------------------------------------------------------------/
+/ Petit FatFs module is a generic FAT file system module for small embedded
+/ systems. This is a free software that opened for education, research and
+/ commercial developments under license policy of following trems.
+/
+/ Copyright (C) 2014, ChaN, all right reserved.
+/
+/ * The Petit FatFs module is a free software and there is NO WARRANTY.
+/ * No restriction on use. You can use, modify and redistribute it for
+/ personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
+/ * Redistributions of source code must retain the above copyright notice.
+/
+/-----------------------------------------------------------------------------/</pre>
+<p>Therefore FatFs license is one of the BSD-style licenses but there is a significant feature. Because FatFs is for embedded projects, the conditions of redistributions in binary form, such as embedded code, hex file, binary library and any form without source code, are not specified in order to extend usability to commercial use. The documentation of the distributions need not include about Petit FatFs and its license document, and it may also. This is equivalent to the BSD 1-Clause License. Of course Petit FatFs is compatible with the projects under GNU GPL. When redistribute the Petit FatFs with any modification, the license can also be changed to GNU GPL or BSD-style license.</p>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/dinit.html b/3rdparty/petitfs-0.03/doc/pf/dinit.html
new file mode 100644
index 00000000..b7a5f418
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/dinit.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - disk_initialize</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_initialize</h2>
+<p>The disk_initialize function initializes the disk drive.</p>
+<pre>
+DSTATUS disk_initialize (void)
+</pre>
+</div>
+
+<div class="para">
+<h4>Return Values</h4>
+<p>The disk status is returned in combination of following flags.</p>
+<dl class="ret">
+<dt>STA_NOINIT</dt>
+<dd>Indicates that the disk drive has not been initialized. This flag is set on: system reset, disk removal and disk_initialize function failed, and cleared on: disk_initialize function succeeded.</dd>
+<dt>STA_NODISK</dt>
+<dd>Indicates that no medium in the drive. This is always cleared on fixed disk drive. This flag is not referred by Petit FatFs.</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>Description</h4>
+<p>The disk_initialize function initializes the storage device. If the function succeeded, <tt>STA_NOINIT</tt> flag in the return value is cleared.</p>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/dreadp.html b/3rdparty/petitfs-0.03/doc/pf/dreadp.html
new file mode 100644
index 00000000..dd97561e
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/dreadp.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - disk_readp</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_readp</h2>
+<p>The disk_readp function reads a partial sector of the device.</p>
+<pre>
+DRESULT disk_readp (
+ BYTE* <span class="arg">buff</span>, <span class="c">/* [OUT] Pointer to the read buffer */</span>
+ DWORD <span class="arg">sector</span>, <span class="c">/* [IN] Sector number */</span>
+ UINT <span class="arg">offset</span>, <span class="c">/* [IN] Byte offset in the sector to start to read */</span>
+ UINT <span class="arg">count</span> <span class="c">/* [IN] Number of bytes to read */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>buff</dt>
+<dd>Pointer to the read buffer to store the read data. If a NULL is given, read bytes will be forwarded to the outgoing stream instead of the memory.</dd>
+<dt>sector</dt>
+<dd>Specifies the sector number to be read in logical block address (LBA).</dd>
+<dt>offset</dt>
+<dd>Specifies the byte offset in the sector to start to read. The value can be 0 to 511.</dd>
+<dt>count</dt>
+<dd>Specifies number of bytes to read. The value can be 0 to 512 and <tt class="arg">offset</tt> + <tt class="arg">count</tt> must not exceed 512.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Value</h4>
+<dl class="ret">
+<dt>RES_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>RES_ERROR</dt>
+<dd>Any hard error occured during the disk read operation and could not recover it.</dd>
+<dt>RES_PARERR</dt>
+<dd>Invalid parameter.</dd>
+<dt>RES_NOTRDY</dt>
+<dd>The device has not been initialized.</dd>
+</dl>
+</div>
+
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/dwritep.html b/3rdparty/petitfs-0.03/doc/pf/dwritep.html
new file mode 100644
index 00000000..d3342ce1
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/dwritep.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - disk_writep</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_writep</h2>
+<p>The disk_writep function writes data to the sector.</p>
+<pre>
+DRESULT disk_writep (
+ BYTE* <span class="arg">buff</span>, <span class="c">/* [IN] Pointer to the data to be written */</span>
+ DWORD <span class="arg">sc</span>, <span class="c">/* [IN] Sector number or Number of bytes to wtite */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>buff</dt>
+<dd>Pointer to the data to be written to the sector. If a NULL is given, the function initiate/finalize a write transaction to the sector.</dd>
+<dt>sc</dt>
+<dd>Specifies nubmer of bytes to write if <tt class="arg">buff</tt> is not a NULL. If <tt class="arg">buff</tt> is a NULL and <tt class="arg">sc</tt> is not a zero, the function initiates a write transactin to the sector. If <tt class="arg">buff</tt> and <tt class="arg">sc</tt> are zero, the function finalize the current sector write transactin.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Value</h4>
+<dl class="ret">
+<dt>RES_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>RES_ERROR</dt>
+<dd>Any hard error occured during the write operation and could not recover it or the medium is write protected.</dd>
+<dt>RES_PARERR</dt>
+<dd>Invalid parameter.</dd>
+<dt>RES_NOTRDY</dt>
+<dd>The device has not been initialized.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>A sector write operation is done in following sequence.</p>
+<ol>
+<li><tt>disk_writep(0, sector_number);</tt> Initiate a sector write transaction.</li>
+<li><tt>disk_writep(data, byte_to_write);</tt> Start to write data to the sector.</li>
+<li><tt>disk_writep(data, byte_to_write);</tt> And data can be written upto 512 bytes with one or more calls.</li>
+<li><tt>disk_writep(data, byte_to_write);</tt> ...</li>
+<li><tt>disk_writep(0, 0);</tt> Finalize the write transaction. If number of bytes sent is less than 512, left bytes in the sector is filled by zero.</li>
+</ol>
+<p>If a write transaction is in progress, <tt>disk_readp()</tt> function will fail and <tt>disk_initialize()</tt> function finalize the current write transaction.</p>
+</div>
+
+
+<div class="para">
+<h4>Remarks</h4>
+<p>This funciton is needed when <tt>_USE_WRITE == 1</tt>.</p>
+</div>
+
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/filename.html b/3rdparty/petitfs-0.03/doc/pf/filename.html
new file mode 100644
index 00000000..58e42453
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/filename.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - Path Names</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>Format of the path names</h2>
+<p>The path name format on the Petit FatFs module is similer to MS-DOS as follows.</p>
+<pre>"[/]<em>directory</em>/<em>file</em>"</pre>
+<p>The Petit FatFs module supports only 8.3 format file name. The sub-directories are separated with a /. The path name is terminated with a nul character, control character or white space. Heading spaces are ignored and skipped. When <tt>_USE_LCC == 1</tt>, lower case characters are allowed for the path name.</p>
+<p>The Petit FatFs module does not have a concept of current directory like OS oriented file system. All objects on the volume are always specified in full path name following from the root directory. Heading separator is ignored and it can be exist or omitted.</p>
+</div>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/lseek.html b/3rdparty/petitfs-0.03/doc/pf/lseek.html
new file mode 100644
index 00000000..1dbb0dea
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/lseek.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - pf_lseek</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>pf_lseek</h2>
+<p>The pf_lseek function moves the file read/write pointer of the open file.</p>
+
+<pre>
+FRESULT pf_lseek (
+ DWORD <span class="arg">ofs</span> <span class="c">/* [IN] File offset in unit of byte */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>ofs</dt>
+<dd>Number of bytes where from start of the file</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function, a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_OPENED</dt>
+<dd>The file has not been opened.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The <tt>pf_lseek()</tt> function moves the file read/write pointer of the open file. The <tt class="arg">offset</tt> can be specified in only origin from top of the file.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ <span class="c">/* Move to offset of 5000 from top of the file */</span>
+ res = pf_lseek(5000);
+
+ <span class="c">/* Forward 3000 bytes */</span>
+ res = pf_lseek(fs.fptr + 3000);
+
+ <span class="c">/* Rewind 2000 bytes (take care on wraparound) */</span>
+ res = pf_lseek(fs.fptr - 2000);
+</pre>
+</div>
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_USE_LSEEK == 1</tt>.</p>
+</div>
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="open.html">pf_open</a>, <a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/mount.html b/3rdparty/petitfs-0.03/doc/pf/mount.html
new file mode 100644
index 00000000..4c0f0210
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/mount.html
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - pf_mount</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>pf_mount</h2>
+<p>The pf_mount fucntion mounts a volume.</p>
+<pre>
+FRESULT pf_mount (
+ FATFS* <span class="arg">fs</span> <span class="c">/* [IN] Pointer to the work area */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>fs</dt>
+<dd>Pointer to the work area (file system object) to be registered.</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The drive could not be initialized due to a disk error or no medium.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>An error occured in the disk function.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT partition on the disk.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The <tt>pf_mount()</tt> function registers a work area to the Petit FatFs module. The volume is mounted on registration. The volume must be mounted with this function prior to any other file function and after every media changes.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Always available.</p>
+</div>
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/open.html b/3rdparty/petitfs-0.03/doc/pf/open.html
new file mode 100644
index 00000000..2914467f
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/open.html
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - pf_open</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>pf_open</h2>
+<p>The pf_open function opens an existing file.</p>
+<pre>
+FRESULT pf_open (
+ const char* <span class="arg">path</span> <span class="c">/* [IN] Pointer to the file neme */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>path</dt>
+<dd>Pointer to a null-terminated string that specifies the <a href="filename.html">file name</a> to open.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NO_FILE</dt>
+<dd>Could not find the file or path.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to a hard error in the disk function, a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The volume has not been mounted.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The file must be opend prior to use <tt>pf_read()</tt> and <tt>pf_lseek()</tt> function. The open file is valid until next open.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+int main (void)
+{
+ FATFS fs; <span class="c">/* Work area (file system object) for the volume */</span>
+ BYTE buff[16]; <span class="c">/* File read buffer */</span>
+ UINT br; <span class="c">/* File read count */</span>
+ FRESULT res; <span class="c">/* Petit FatFs function common result code */</span>
+
+
+ <span class="c">/* Mount the volume */</span>
+ pf_mount(&amp;fs);
+ if (res) die(res);
+
+ <span class="c">/* Open a file */</span>
+ res = pf_open("srcfile.dat");
+ if (res) die(res);
+
+ <span class="c">/* Read data to the memory */</span>
+ res = pf_read(buff, 16, &amp;br); <span class="c">/* Read data to the buff[] */</span>
+ if (res) die(res); <span class="c">/* Check error */</span>
+ if (br != 16) die(255); <span class="c">/* Check EOF */</span>
+
+ ....
+
+ <span class="c">/* Forward data to the outgoing stream */</span>
+ do
+ res = pf_read(0, 512, &amp;br); <span class="c">/* Send data to the stream */</span>
+ while (res || br != 512); <span class="c">/* Break on error or eof */</span>
+
+ ....
+
+}
+</pre>
+</div>
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Always available.</p>
+</div>
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="read.html">pf_read</a>, <a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/opendir.html b/3rdparty/petitfs-0.03/doc/pf/opendir.html
new file mode 100644
index 00000000..6cb71d07
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/opendir.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - pf_opendir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>pf_opendir</h2>
+<p>The pf_opendir function opens a directory.</p>
+<pre>
+FRESULT pf_opendir (
+ DIR* <span class="arg">dp</span>, <span class="c">/* [OUT] Pointer to the blank directory object structure */</span>
+ const char* <span class="arg">path</span> <span class="c">/* [IN] Pointer to the directory name */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>dp</dt>
+<dd>Pointer to the blank directory object to be created.</dd>
+<dt>path</dt>
+<dd>Pinter to the null-terminated string that specifies the <a href="filename.html">directory name</a> to be opened.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded and the directory object is created. It is used for subsequent calls to read the directory entries.</dd>
+<dt>FR_NO_FILE</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to a hard error in the disk function, a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The volume has no work area.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The <tt>pf_opendir()</tt> function opens an exsisting directory and creates the directory object for subsequent calls. The directory object structure can be discarded at any time without any procedure.</p>
+</div>
+
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_USE_DIR == 1</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="readdir.html">f_readdir</a>, <a href="sdir.html">DIR</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/read.html b/3rdparty/petitfs-0.03/doc/pf/read.html
new file mode 100644
index 00000000..a76c8ed3
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/read.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - pf_read</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>pf_read</h2>
+<p>The pf_read function reads data from the file.</p>
+<pre>
+FRESULT pf_read (
+ void* <span class="arg">buff</span>, <span class="c">/* [OUT] Pointer to the read buffer */</span>
+ UINT <span class="arg">btr</span>, <span class="c">/* [IN] Number of bytes to read */</span>
+ UINT* <span class="arg">br</span> <span class="c">/* [OUT] Number of bytes read */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>buff</dt>
+<dd>Pointer to the buffer to store the read data. A NULL specifies the destination is an outgoing stream.</dd>
+<dt>btr</dt>
+<dd>Number of bytes to read.</dd>
+<dt>br</dt>
+<dd>Pointer to the variable to return number of bytes read.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to a hard error in the disk function, a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_OPENED</dt>
+<dd>The file has not been opened.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The volume has not been mounted.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The file read/write pointer in the file system object advances in number of bytes read. After the function succeeded, <tt>*br</tt> should be checked to detect end of file. In case of <tt>*br &lt; btr</tt>, it means the read pointer reached end of file during read operation.</p>
+<p>If a NULL is given to the <tt class="arg">buff</tt>, the read bytes will be forwarded to the outgoing stream instead of the memory. The streaming function will be typically built-in the <tt>disk_readp()</tt> function.</p>
+</div>
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_USE_READ == 1</tt>.</p>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="open.html">pf_open</a>, <a href="write.html">pf_write</a>, <a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/readdir.html b/3rdparty/petitfs-0.03/doc/pf/readdir.html
new file mode 100644
index 00000000..7f778e1d
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/readdir.html
@@ -0,0 +1,100 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - pf_readdir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>pf_readdir</h2>
+<p>The pf_readdir function reads directory entries.</p>
+<pre>
+FRESULT pf_readdir (
+ DIR* <span class="arg">dp</span>, <span class="c">/* [IN] Pointer to the open directory object */</span>
+ FILINFO* <span class="arg">fno</span> <span class="c">/* [OUT] Pointer to the file information structure */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>dp</dt>
+<dd>Pointer to the open directory object.</dd>
+<dt>fno</dt>
+<dd>Pointer to the file information structure to store the read item.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to an error in the disk function, a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_OPENED</dt>
+<dd>The directory object has not been opened.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The <tt>pf_readdir()</tt> function reads directory entries in sequence. All items in the directory can be read by calling this function repeatedly. When all directory entries have been read and no item to read, the function returns a null string into member <tt>f_name[]</tt> in the file information structure without error. When a null pointer is given to the <tt class="arg">fno</tt>, the read index of the directory object will be rewinded.</p>
+</div>
+
+
+<div class="para">
+<h4>Sample Code</h4>
+<pre>
+FRESULT scan_files (char* path)
+{
+ FRESULT res;
+ FILINFO fno;
+ DIR dir;
+ int i;
+
+
+ res = pf_opendir(&amp;dir, path);
+ if (res == FR_OK) {
+ i = strlen(path);
+ for (;;) {
+ res = pf_readdir(&amp;dir, &amp;fno);
+ if (res != FR_OK || fno.fname[0] == 0) break;
+ if (fno.fattrib &amp; AM_DIR) {
+ sprintf(&amp;path[i], "/%s", fno.fname);
+ res = scan_files(path);
+ if (res != FR_OK) break;
+ path[i] = 0;
+ } else {
+ printf("%s/%s\n", path, fno.fname);
+ }
+ }
+ }
+
+ return res;
+}
+</pre>
+</div>
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_USE_DIR == 1</tt>.</p>
+</div>
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="opendir.html">pf_opendir</a>, <a href="sfileinfo.html">FILINFO</a>, <a href="sdir.html">DIR</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/sdir.html b/3rdparty/petitfs-0.03/doc/pf/sdir.html
new file mode 100644
index 00000000..e7e7a235
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/sdir.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - DIR</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>DIR</h2>
+<p>The <tt>DIR</tt> structure is used for the work area to read a directory by pf_oepndir, pf_readdir function.</p>
+<pre>
+typedef struct {
+ WORD index; <span class="c">/* Current read/write index number */</span>
+ BYTE* fn; <span class="c">/* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */</span>
+ CLUST sclust; <span class="c">/* Table start cluster (0:Static table) */</span>
+ CLUST clust; <span class="c">/* Current cluster */</span>
+ DWORD sect; <span class="c">/* Current sector */</span>
+} DIR;
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/sfatfs.html b/3rdparty/petitfs-0.03/doc/pf/sfatfs.html
new file mode 100644
index 00000000..35d385a3
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/sfatfs.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - FATFS</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FATFS</h2>
+<p>The <tt>FATFS</tt> structure holds dynamic work area of the logical drive and a file. It is given by application program and registerd/unregisterd to the Petit FatFs module with pf_mount function. There is no member that can be changed by application programs.</p>
+<pre>
+typedef struct {
+ BYTE fs_type; <span class="c">/* FAT sub type */</span>
+ BYTE csize; <span class="c">/* Number of sectors per cluster */</span>
+ BYTE flag; <span class="c">/* File status flags */</span>
+ BYTE pad1;
+ WORD n_rootdir; <span class="c">/* Number of root directory entries (0 on FAT32) */</span>
+ CLUST n_fatent; <span class="c">/* Number of FAT entries (= number of clusters + 2) */</span>
+ DWORD fatbase; <span class="c">/* FAT start sector */</span>
+ DWORD dirbase; <span class="c">/* Root directory start sector (Cluster# on FAT32) */</span>
+ DWORD database; <span class="c">/* Data start sector */</span>
+ DWORD fptr; <span class="c">/* File read/write pointer */</span>
+ DWORD fsize; <span class="c">/* File size */</span>
+ CLUST org_clust; <span class="c">/* File start cluster */</span>
+ CLUST curr_clust; <span class="c">/* File current cluster */</span>
+ DWORD dsect; <span class="c">/* File current data sector */</span>
+} FATFS;
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/sfileinfo.html b/3rdparty/petitfs-0.03/doc/pf/sfileinfo.html
new file mode 100644
index 00000000..cd0ed7f1
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/sfileinfo.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - FILINFO</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FILINFO</h2>
+<p>The <tt>FILINFO</tt> structure holds a file information returned by pf_readdir function.</p>
+<pre>
+typedef struct {
+ DWORD fsize; <span class="c">/* File size */</span>
+ WORD fdate; <span class="c">/* Last modified date */</span>
+ WORD ftime; <span class="c">/* Last modified time */</span>
+ BYTE fattrib; <span class="c">/* Attribute */</span>
+ char fname[13]; <span class="c">/* File name */</span>
+} FILINFO;
+</pre>
+</div>
+
+<h4>Members</h4>
+<dl>
+<dt>fsize</dt>
+<dd>Indicates size of the file in unit of byte. This is always zero when it is a directory.</dd>
+<dt>fdate</dt>
+<dd>Indicates the date that the file was modified or the directory was created.<br>
+<dl>
+<dt>bit15:9</dt>
+<dd>Year origin from 1980 (0..127)</dd>
+<dt>bit8:5</dt>
+<dd>Month (1..12)</dd>
+<dt>bit4:0</dt>
+<dd>Day (1..31)</dd>
+</dl>
+</dd>
+<dt>ftime</dt>
+<dd>Indicates the time that the file was modified or the directory was created.<br>
+<dl>
+<dt>bit15:11</dt>
+<dd>Hour (0..23)</dd>
+<dt>bit10:5</dt>
+<dd>Minute (0..59)</dd>
+<dt>bit4:0</dt>
+<dd>Second / 2 (0..29)</dd>
+</dl>
+</dd>
+<dt>fattrib</dt>
+<dd>Indicates the file/directory attribute in combination of <tt>AM_DIR</tt>, <tt>AM_RDO</tt>, <tt>AM_HID</tt>, <tt>AM_SYS</tt> and <tt>AM_ARC</tt>.</dd>
+<dt>fname[]</dt>
+<dd>Indicates the file/directory name in 8.3 format null-terminated string.</dd>
+</dl>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>
diff --git a/3rdparty/petitfs-0.03/doc/pf/write.html b/3rdparty/petitfs-0.03/doc/pf/write.html
new file mode 100644
index 00000000..573a298b
--- /dev/null
+++ b/3rdparty/petitfs-0.03/doc/pf/write.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="up" title="Petit FatFs" href="../00index_p.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<link rel="stylesheet" href="../css_p.css" type="text/css" media="screen" title="ELM Default">
+<title>Petit FatFs - pf_write</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>pf_write</h2>
+<p>The pf_write function writes data to the file.</p>
+<pre>
+FRESULT pf_write (
+ const void* <span class="arg">buff</span>, <span class="c">/* [IN] Pointer to the data to be written */</span>
+ UINT <span class="arg">btw</span>, <span class="c">/* [IN] Number of bytes to write */</span>
+ UINT* <span class="arg">bw</span> <span class="c">/* [OUT] Pointer to the variable to return number of bytes written */</span>
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>buff</dt>
+<dd>Pointer to the data to be wtitten. A NULL specifies to finalize the current write operation.</dd>
+<dt>btw</dt>
+<dd>Number of bytes to write.</dd>
+<dt>bw</dt>
+<dd>Pointer to the variable to return number of bytes read.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DISK_ERR</dt>
+<dd>The function failed due to a hard error in the disk function, write protected, a wrong FAT structure or an internal error.</dd>
+<dt>FR_NOT_OPENED</dt>
+<dd>The file has not been opened.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The volume has not been mounted.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The write function has some restrictions listed below:</p>
+<ul>
+<li>Cannot create file. Only existing file can be written.</li>
+<li>Cannot expand file size.</li>
+<li>Cannot update time stamp of the file.</li>
+<li>Write operation can start/stop on the sector boundary.</li>
+<li>Read-only attribute of the file cannot block write operation.</li>
+</ul>
+<p>File write operation must be done in following sequence.</p>
+<ol>
+<li><tt>pf_lseek(ofs);</tt> read/write pointer must be moved to sector bundary prior to initiate write operation or it will be rounded-down to the sector boundary.</li>
+<li><tt>pf_write(buff, btw, &amp;bw);</tt> Initiate write operation. Write first data to the file.</li>
+<li><tt>pf_write(buff, btw, &amp;bw);</tt> Write next data. Any other file function cannot be used while a write operation is in progress.</li>
+<li><tt>pf_write(0, 0, &amp;bw);</tt> Finalize the write operation. If read/write pointer is not on the sector boundary, left bytes in the sector will be filled with zero.</li>
+</ol>
+<p>The read/write pointer in the file system object advances in number of bytes written. After the function succeeded, <tt>*bw</tt> should be checked to detect end of file. In case of <tt>*bw &lt; btw</tt>, it means the read/write pointer reached end of file during the write operation. Once a write operation is initiated, it must be finalized or the written data can be lost.</p>
+</div>
+
+<div class="para">
+<h4>QuickInfo</h4>
+<p>Available when <tt>_USE_WRITE == 1</tt>.</p>
+</div>
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="open.html">pf_open</a>, <a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_p.html">Return</a></p>
+</body>
+</html>