summaryrefslogtreecommitdiff
path: root/third_party/fatfs/doc/en
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2014-08-08 14:42:07 +0300
committerYuval Adam <yuv.adm@gmail.com>2014-08-08 14:42:07 +0300
commita6163888f3c56123b1db313743c6147ba498732c (patch)
treeff7d15d991d1d09ba6cbc0cec80924f57445bfdd /third_party/fatfs/doc/en
parentc3e4c9a25c2910d2d66d52215b3406b13d5b23d5 (diff)
Add third_party libs
Diffstat (limited to 'third_party/fatfs/doc/en')
-rw-r--r--third_party/fatfs/doc/en/appnote.html124
-rw-r--r--third_party/fatfs/doc/en/chmod.html89
-rw-r--r--third_party/fatfs/doc/en/close.html60
-rw-r--r--third_party/fatfs/doc/en/dinit.html44
-rw-r--r--third_party/fatfs/doc/en/dioctl.html65
-rw-r--r--third_party/fatfs/doc/en/dread.html58
-rw-r--r--third_party/fatfs/doc/en/dstat.html47
-rw-r--r--third_party/fatfs/doc/en/dwrite.html66
-rw-r--r--third_party/fatfs/doc/en/fattime.html50
-rw-r--r--third_party/fatfs/doc/en/filename.html58
-rw-r--r--third_party/fatfs/doc/en/getfree.html91
-rw-r--r--third_party/fatfs/doc/en/lseek.html86
-rw-r--r--third_party/fatfs/doc/en/mkdir.html83
-rw-r--r--third_party/fatfs/doc/en/mkfs.html73
-rw-r--r--third_party/fatfs/doc/en/mount.html59
-rw-r--r--third_party/fatfs/doc/en/mountdrv.html57
-rw-r--r--third_party/fatfs/doc/en/open.html136
-rw-r--r--third_party/fatfs/doc/en/opendir.html73
-rw-r--r--third_party/fatfs/doc/en/read.html71
-rw-r--r--third_party/fatfs/doc/en/readdir.html89
-rw-r--r--third_party/fatfs/doc/en/rename.html84
-rw-r--r--third_party/fatfs/doc/en/sdir.html42
-rw-r--r--third_party/fatfs/doc/en/sfatfs.html63
-rw-r--r--third_party/fatfs/doc/en/sfile.html55
-rw-r--r--third_party/fatfs/doc/en/sfileinfo.html43
-rw-r--r--third_party/fatfs/doc/en/stat.html73
-rw-r--r--third_party/fatfs/doc/en/sync.html60
-rw-r--r--third_party/fatfs/doc/en/unlink.html69
-rw-r--r--third_party/fatfs/doc/en/write.html71
29 files changed, 2039 insertions, 0 deletions
diff --git a/third_party/fatfs/doc/en/appnote.html b/third_party/fatfs/doc/en/appnote.html
new file mode 100644
index 0000000..94560f4
--- /dev/null
+++ b/third_party/fatfs/doc/en/appnote.html
@@ -0,0 +1,124 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs Module Application Note</title>
+</head>
+
+<body>
+<h1>FatFs Module Application Note</h1>
+<hr>
+
+<div class="para">
+<h3>Considerations on porting to various platform</h3>
+<p>The FatFs module is assuming following terms on portability.</p>
+<ul>
+<li>ANSI C<br>
+The FatFs module is a middleware that written in ANSI C. There is no platform dependence, so long as the compiler is in compliance with ANSI C. However it handles the system portable FAT structures. You must take the <strong>endian</strong> into consideration. This setting is defined in ff.h (tff.h). It must be changed for your platform first or the compiler will abort with an error.</li>
+<li>Size of char/short/long are 8/16/32 bit and int is 16 bit or grater.<br>
+These correspondence are defined in integer.h. This will not be a problem on most compilers. When any conflict of the definitions between the integer.h and existing definitions is occured, you must resolve the confrict with care.</li>
+</ul>
+</div>
+
+<div class="para">
+<h3>Memory Usage (R0.04b)</h3>
+<p>These are the memory usage on some target systems. The memory sizes are in unit of byte, D means number of logical drives and F means number of open files. All samples are optimezed in code size.</p>
+<table class="lst2">
+<tr><th></th><th>AVR</th><th>H8/300H</th><th>MSP430</th><th>TLCS-870/C</th><th>V850ES</th><th>SH2</th></tr>
+<tr><td>Compiler</td><td>gcc</td><td>CH38</td><td>CL430</td><td>CC870C</td><td>CA850</td><td>SHC</td></tr>
+<tr><td>_MCU_ENDIAN</td><td>1</td><td>2</td><td>2</td><td>1</td><td>1</td><td>2</td></tr>
+<tr><td>FatFs Code<br>(Standard, R/W cfg.)</td><td>8722</td><td>8776</td><td></td><td></td><td>6402</td><td>7338</td></tr>
+<tr><td>FatFs Code<br>(Minimum, R/W cfg.)</td><td>5814</td><td>5722</td><td></td><td></td><td>4094</td><td>4906</td></tr>
+<tr><td>FatFs Code<br>(Standard, R/O cfg.)</td><td>4248</td><td>4096</td><td></td><td></td><td>3010</td><td>3506</td></tr>
+<tr><td>FatFs Code<br>(Minimum, R/O cfg.)</td><td>3038</td><td>3110</td><td></td><td></td><td>2210</td><td>2698</td></tr>
+<tr><td>FatFs Work (Static)</td><td>D*2 + 2</td><td>D*4 + 2</td><td></td><td></td><td>D*4 + 2</td><td>D*4 + 2</td></tr>
+<tr><td>FatFs Work (Dynamic)</td><td>D*554 + F*544</td><td>D*554 + F*550</td><td></td><td></td><td>D*554 + F*550</td><td>D*554 + F*550</td></tr>
+<tr><td>Tiny-FatFs Code<br>(Standard, R/W cfg.)</td><td>7264</td><td>7240</td><td>6634</td><td>8837</td><td></td><td></td></tr>
+<tr><td>Tiny-FatFs Code<br>(Minimum, R/W cfg.)</td><td>4750</td><td>4806</td><td>4366</td><td>6163</td><td></td><td></td></tr>
+<tr><td>Tiny-FatFs Code<br>(Standard, R/O cfg.)</td><td>3600</td><td>3548</td><td>3212</td><td>4347</td><td></td><td></td></tr>
+<tr><td>Tiny-FatFs Code<br>(Minimum, R/O cfg.)</td><td>2568</td><td>2702</td><td>2394</td><td>3322</td><td></td><td></td></tr>
+<tr><td>Tiny-FatFs Wrok (Static)</td><td>4</td><td>6</td><td>4</td><td>4</td><td></td><td></td></tr>
+<tr><td>Tiny-FatFs Work (Dynamic)</td><td>544 + F*28</td><td>544 + F*32</td><td>544 + F*28</td><td>544 + F*28</td><td></td><td></td></tr>
+</table>
+</div>
+
+<div class="para">
+<h3>FatFs vs. Tiny-FatFs</h3>
+<p>For most applications, such as portable audio and data logger, Tiny-FatFs is the best choice. However because the Tiny-FatFs does not support FAT32 in default, there is a limitation that can handle only tiny storage upto 2GB(4GB in FAT64). The FAT32 support can be added by <tt>_USE_FAT32</tt> option with an additional code size. The FatFs is suitable for fast multiple files access, and for multiple drive system.</p>
+<div class="rset">
+<table class="lst2">
+<tr><th>Memory Size</th><th>FAT Type</th></tr>
+<tr><td>&lt;= 64MB</td><td>FAT12</td></tr>
+<tr><td>128MB - 2GB</td><td>FAT16</td></tr>
+<tr><td>&gt;= 4GB</td><td>FAT32</td></tr>
+</table>
+</div>
+<p>Rignt table shows the correspondence between memory size and FAT type for SD memroy card and they are shipped with this format. The data area is justified to the erase block boundary and the memory card works with the best performance. For that reason, the memory card should not be reformated with PC. When cluster size or FAT type is changed, the write performance can be decreased.</p>
+</div>
+
+
+<div class="para">
+<h3>Performance effective file access</h3>
+<p>For good performance on reading/writing files on the small embedded system, application program should consider what process is done in the FatFs module. The file data on the disk is transferred by f_read function in following process.</p>
+<p>Figure 1. Sector miss-aligned read (short)<br>
+<img src="../img/f1.png" width="490" height="73">
+</p>
+<p>Figure 2. Sector miss-aligned read (long)<br>
+<img src="../img/f2.png" width="490" height="140">
+</p>
+<p>Figure 3. Sector aligned read<br>
+<img src="../img/f3.png" width="490" height="119">
+</p>
+<p>The file I/O buffer means a sector buffer to read/write a partial data on the sector. On the FatFs, member buffer[] in the file object is used. On the Tiny-FatFs, member win[] in the file system object is used.</p>
+<p>Tiny-FatFs processes all data transfer and access to the FAT/directory with only one sector buffer, so that FAT sector cached into the buffer is lost and it must reloaded at every cluster boundary. FatFs has a FAT/directory buffer separated from file I/O buffer, the frequency of FAT accesses is only 1/341, 1/256 or 1/128 (when cluster is contiguous) compared to Tiny-FatFs. Thus the Tiny-FatFs is sacrificing its performance in compensation for very small memory footprint.</p>
+<p>Figure 1 shows that partial sector data is transferred via the file I/O buffer. At long data transfer shown in Figure 2, middle of transfer data that aligned to sector boundary is transferred into memory directly. Figure 3 shows that entier transfer data is aligned to the sector boundary. In this case, file I/O buffer is not used. At the unbuffered transfer, maximum extent of sectors are read with disk_read function at a time but it never across cluster boundary even if it is contiguous.</p>
+<p>Therefore taking effort to sector aligned read/write accesss eliminates memcpy and the read/write performance will be improved. Besides the effect, cached FAT sector is not flushed during read/write access on the Tiny-FatFs, so that it can achieve same performance as FatFs and its small memory footprint simultanesously.</p>
+</div>
+
+
+<div class="para">
+<h3>Critical section</h3>
+<p>When write operation to the FAT file system is interrupted due to any accidental failure, such as sudden blackout, incorrect disk removal and unrecoverable data error, the FAT structure can be destroyed. Following images shows the critical section on the FatFs module.</p>
+<div class="lset">
+Figure 4. Long critical section<br>
+<img src="../img/f4.png" width="320" height="436" alt="fig.4">
+</div>
+<div class="lset">
+Figure 5. Minimized critical section<br>
+<img src="../img/f5.png" width="320" height="436" alt="fig.5">
+</div>
+<br class="clr">
+<p>An interruption in the red section can cause a cross link; as a result, the file/directory being changed will be lost. There is one or more possibility listed below when an interruption in the yellow section is occured.</p>
+<ul>
+<li>File data being rewrited is collapted.</li>
+<li>A file being appended returns initial state.</li>
+<li>A file created as new is gone.</li>
+<li>A file created as new or in overwrite remains with length of zero.</li>
+<li>Efficiency of disk use gets worse due to lost chain.</li>
+</ul>
+<p>Each case does not affect the files that not in write operation. To minimize risk of data loss, the critical section can be minimized like shown in Figure 5 by minimizing the time that file is opened in write mode and using f_sync function properly.</p>
+</div>
+
+
+<div class="para">
+<h3>Problems and Ideas</h3>
+<ul>
+<li>Abstraction of file object<br>
+Currently the file object structure is held by application layer. This is not a problem for Tiny-FatFs, it consumes the task stack only 26 bytes per file. But FatFs requires 550 bytes per file. When managed the file objects in file handle, stack consumption at application module will able to be reduced. In this case, the work area for file objects is managed in FatFs module. This has a disadvantage that direct access to the file object structure cannot be used and additional file functions, such as feof and ftell, will be needed.</li>
+<li>Efficient sector buffer management<br>
+The FatFs module has only one sector buffer per logical drive. There is an ineffciency on random file access with many files simultanesously. When additional memory for the sector buffer is available, the file access performance will able to be improved with an advanced cache mechanism.</li>
+<li>Long file name<br>
+There is an extended feature to handle long file name (LFN) up to 255 characters, in addition to 8.3 format file name, on FAT file system. To support this, 512 byte string buffer for file name and UCS-2 - Shift_JIS mutual conversion table are required. Therefore memory consumption of code and work area will be increased drastically. The FatFs module does not support this feature. The LFN on the FAT file system is a patent of Microsoft. When support it on the commercial products, you have to be licensed.</li>
+<li>Porting to RTOS<br>
+When use FatFs module from only one task, no consideration is needed. However when make access to a logical drive from two or more tasks simultanesously, any exclusion control will be required. The FatFs module is also ported to a free RTOS based on &mu;ITRON by <a href="http://www.toppers.jp/en/index.html">TOPPERS Project</a>.</li>
+</ul>
+<br>
+<p>These are the problems and ideas on current revision of FatFs module. However the main target of FatFs module is 8 bit microcontrollers. These extensions requires much resource and the FatFs will unable to be ported to the 8 bit system. This may be the most serious problem on future plan.</p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/chmod.html b/third_party/fatfs/doc/en/chmod.html
new file mode 100644
index 0000000..bdb3c12
--- /dev/null
+++ b/third_party/fatfs/doc/en/chmod.html
@@ -0,0 +1,89 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_chmod</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_chmod</h2>
+<p>The f_chmod function changes the attribute of a file or directory.</p>
+<pre>
+FRESULT f_chmod (
+ const char* <em>FileName</em>, /* Pointer to the file or directory */
+ BYTE <em>Attribute</em>, /* Attribute flags */
+ BYTE <em>AttributeMask</em> /* Attribute masks */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>Pointer to the null-terminated string that specifies a <a href="filename.html">file or directory</a> to be changed</dd>
+<dt>Attribute</dt>
+<dd>Attribute flags to be set in one or more combination of the following flags. The specified flags are set and others are cleard.<br>
+<table class="lst">
+<tr><th>Attribute</th><th>Description</th></td>
+<tr><td>AM_RDO</td><td>Read only</td></td>
+<tr><td>AM_ARC</td><td>Archive</td></td>
+<tr><td>AM_SYS</td><td>System</td></td>
+<tr><td>AM_HID</td><td>Hidden</td></td>
+</table>
+</dd>
+<dt>AttributeMask</dt>
+<dd>Attribute mask that specifies which attribute is changed. The specified aattributes are set or cleard.</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.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The file name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</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_WRITE_PROTECTED</dt>
+<dd>The medium is write protected.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</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 f_chmod function changes the attribute of a file or directory. This function is not supported in read-only configuration and minimization level of &gt;=1.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ // Set read-only flag, clear archive flag and others are retained.
+ f_chmod("file.txt", AR_RDO, AR_RDO | AR_ARC);
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/close.html b/third_party/fatfs/doc/en/close.html
new file mode 100644
index 0000000..642dda7
--- /dev/null
+++ b/third_party/fatfs/doc/en/close.html
@@ -0,0 +1,60 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_close</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_close</h2>
+<p>The f_close function closes an open file.</p>
+<pre>
+FRESULT f_close (
+ FIL* <em>FileObject</em> /* Pointer to the file object structure */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure to be closed.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The file object has been closed successfuly.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</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_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_close function closes an open file object. If any data has been written to the file, the cached information of the file is written back to the disk. After the function succeeded, the file object is no longer valid and it can be discarded. If the file object has been opened in read-only mode, it may be discarded without closing process by this function.</p>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="write.html">f_write</a>, <a href="sync.html">f_sync</a>, <a href="sfile.html">FIL</a>, <a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/dinit.html b/third_party/fatfs/doc/en/dinit.html
new file mode 100644
index 0000000..d95aef1
--- /dev/null
+++ b/third_party/fatfs/doc/en/dinit.html
@@ -0,0 +1,44 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>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 (
+ BYTE <em>Drive</em> /* Physical drive number */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies the physical drive number to initialize.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>This function returns a disk status as the result. For details of the disk status, refer to the <a href="dstat.html">disk_status</a> function.</p>
+</div>
+
+<div class="para">
+<h4>Description</h4>
+<p>The disk_initialize function initializes a physical drive. When the function succeeded, <tt>STA_NOINIT</tt> flag in the return value is cleard.</p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/dioctl.html b/third_party/fatfs/doc/en/dioctl.html
new file mode 100644
index 0000000..f1797a7
--- /dev/null
+++ b/third_party/fatfs/doc/en/dioctl.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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_ioctl</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_ioctl</h2>
+<p>The disk_ioctl function cntrols device specified features and miscellaneous functions other than disk read/write.</p>
+<pre>
+DRESULT disk_ioctl (
+ BYTE <em>Drive</em>, /* Drive number */
+ BYTE <em>Command</em>, /* Control command code */
+ void* <em>Buffer</em> /* Data transfer buffer */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies drive number (0-9).</dd>
+<dt>Command</dt>
+<dd>Specifies the command code.</dd>
+<dt>Buffer</dt>
+<dd>Pointer to the parameter buffer depends on the command code. When it is not used, specify a NULL pointer.</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 error occured.</dd>
+<dt>RES_PARERR</dt>
+<dd>Invalid command code.</dd>
+<dt>RES_NOTRDY</dt>
+<dd>The disk dirve has not been initialized.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The FatFs module uses only device independent commands described below. Any device dependent function is not used. In read-only configuration, This function is not needed.</p>
+<table class="lst">
+<tr><th>Command</th><th>Description</td></tr>
+<tr><td>GET_SECTOR_COUNT</td><td>Returns total sectors on the drive into the DWORD variable pointed by Buffer.</td></tr>
+<tr><td>CTRL_SYNC</td><td>Make sure that the drive has finished to write data. When the module has a write back cache, write back the dirty sector immediately.</td></tr>
+</table>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/dread.html b/third_party/fatfs/doc/en/dread.html
new file mode 100644
index 0000000..15e51d4
--- /dev/null
+++ b/third_party/fatfs/doc/en/dread.html
@@ -0,0 +1,58 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_read</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_read</h2>
+<p>The disk_read function reads sector(s) from the disk drive.</p>
+<pre>
+DRESULT disk_read (
+ BYTE <em>Drive</em>, /* Physical drive number */
+ BYTE* <em>Buffer</em>, /* Pointer to the read buffer */
+ DWORD <em>SectorNumber</em>, /* Sector number to read from */
+ BYTE <em>SectorCount</em> /* Number of sectros to read */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies the physical drive number to read.</dd>
+<dt>Buffer</dt>
+<dd>Pointer to the read buffer to store the read data. <tt>SectorCount * 512</tt> bytes is required for the size of the read buffer.</dd>
+<dt>SectorNumber</dt>
+<dd>Specifies the start sector number in logical block address.</dd>
+<dt>SectorCount</dt>
+<dd>Specifies number of sectors to read. The value can be 1 to 255.</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 error occured during the read operation.</dd>
+<dt>RES_PARERR</dt>
+<dd>Invalid parameter.</dd>
+<dt>RES_NOTRDY</dt>
+<dd>The disk dirve has not been initialized.</dd>
+</dl>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/dstat.html b/third_party/fatfs/doc/en/dstat.html
new file mode 100644
index 0000000..41179af
--- /dev/null
+++ b/third_party/fatfs/doc/en/dstat.html
@@ -0,0 +1,47 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_status</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_status</h2>
+<p>The disk_status function gets the disk status.</p>
+<pre>
+DSTATUS disk_status (
+ BYTE <em>Drive</em> /* Physical drive number */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies the physical drive number to be tested.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<p>The disk status is returned in combinatin of following flags.</p>
+<dl class="ret">
+<dt>STA_NOINIT</dt>
+<dd>Indicates that the disk drive has not been initialiezed. This flag is set on: power-on, 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. It is always cleared on fixed disk drive.</dd>
+<dt>STA_PROTECTED</dt>
+<dd>Indicates that the medium is write protected. It is always cleared on the drive that does not support write protect notch.</dd>
+</dl>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/dwrite.html b/third_party/fatfs/doc/en/dwrite.html
new file mode 100644
index 0000000..87e3e8f
--- /dev/null
+++ b/third_party/fatfs/doc/en/dwrite.html
@@ -0,0 +1,66 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - disk_write</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>disk_write</h2>
+<p>The disk_write writes sector(s) to the disk.</p>
+<pre>
+DRESULT disk_write (
+ BYTE <em>Drive</em>, /* Physical drive number */
+ const BYTE* <em>Buffer</em>, /* Pointer to the read buffer */
+ DWORD <em>SectorNumber</em>, /* Sector number to write */
+ BYTE <em>SectorCount</em> /* Number of sectors to write */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Specifies the physical drive number to write.</dd>
+<dt>Buffer</dt>
+<dd>Pointer to the data to be written.</dd>
+<dt>SectorNumber</dd>
+<dd>Specifies the start sector number in logical block address.</dd>
+<dt>SectorCount</dt>
+<dd>Specifies number of sectors to write. The value can be 1 to 255.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>RES_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>RES_ERROR</dt>
+<dd>Any error occured during the write operation.</dd>
+<dt>RES_WRPRT</dt>
+<dd>The disk is write protected.</dd>
+<dt>RES_PARERR</dt>
+<dd>Invalid parameter.</dd>
+<dt>RES_NOTRDY</dt>
+<dd>The disk dirve has not been initialized.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>This function is not required in read only configuration.</p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/fattime.html b/third_party/fatfs/doc/en/fattime.html
new file mode 100644
index 0000000..dbb81a9
--- /dev/null
+++ b/third_party/fatfs/doc/en/fattime.html
@@ -0,0 +1,50 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - get_fattime</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>get_fattime</h2>
+<p>The get_fattime function gets current time.</p>
+<pre>
+DWORD get_fattime (void);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>Return Value</h4>
+<p>Currnet time is returned with packed into a DWORD value. The bit field is as follows:</p>
+<dl class="ret">
+<dt>bit31:25</dt>
+<dd>Year from 1980 (0..127)</dd>
+<dt>bit24:21</dt>
+<dd>Month (1..12)</dd>
+<dt>bit20:16</dt>
+<dd>Date (1..31)</dd>
+<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>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The get_fattime function must return any valid time even if the system does not support a real time clock. This fucntion is not required in read only configuration.</p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/filename.html b/third_party/fatfs/doc/en/filename.html
new file mode 100644
index 0000000..b80e069
--- /dev/null
+++ b/third_party/fatfs/doc/en/filename.html
@@ -0,0 +1,58 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - File and Path name on the FatFs module</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>File and Path name on the FatFs module</h2>
+<p>The format of file and path name on the FatFs module is similer to MS-DOS. However it does not have a concept of current directory, all objects on the drive are specified in full path from the roor directory.</p>
+<pre>
+
+ "[<em>logical drive#</em>:][/]<em>directory</em>/<em>file</em>"
+
+ "file1.txt" a file on drive 0
+ "/file1.txt" (same as above)
+ "dir1/dir2/file1.txt" a file on drive 0
+ "2:dir3/file2.txt" a file on drive 2
+ "2:/dir5" a directory on drive 2
+ "" the root directory on drive 0
+ "/" (same as above)
+ "2:" the root directory on drive 2
+
+</pre>
+<p>The FatFs module supports only 8.3 format file name and long file name is currentry not supported. For directory separator, a '/' is used, not a '\'. Heading '/' is ignored and can be omitted.</p>
+<p>The logical drive number is specified in a numeral with a colon. When drive number is omitted, it means the default drive (0). As for the Tiny-FatFs, it has only one logical drive and always works as drive 0. Any drive number cannot be contained in the path name.</p>
+</div>
+
+<p><br></p>
+<div class="para">
+<h2>Correspondence between logical/physical drive</h2>
+<p>In default, the FatFs module has work areas that called file system object for each logical drive. The logical drive is bound simply to the physical drive that has same drive number, and first partition is mounted. When <tt>_MULTI_PARTITION</tt> is specified in configuration option, each individual logical drive can be bound to any physical drive/partition. In this case, a drive number resolution table must be defined as follows:</p>
+<pre>
+Example: Logical drive 0-2 are assigned to three pri-partitions on the physical drive 0 (fixed disk)
+ Logical drive 3 is assigned to physical drive 0 (removable disk)
+
+const PARTITION Drives[] = {
+ {0, 0}, /* Logical drive 0 ==> Physical drive 0, 1st partition */
+ {0, 1}, /* Logical drive 1 ==> Physical drive 0, 2nd partition */
+ {0, 2}, /* Logical drive 2 ==> Physical drive 0, 3rd partition */
+ {1, 0} /* Logical drive 3 ==> Physical drive 1 */
+};
+</pre>
+<p>There are some consideration when use <tt>_MULTI_PARTITION</tt> configuration.</p>
+<ul>
+<li>Only pri-partition (0-3) can be mounted.</li>
+<li>When the drive have no partition table (super floppy format), partition number is ignored.</li>
+<li>The drive that has two or more logical drive must be fixed drive.</li>
+</li>
+</div>
+
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/getfree.html b/third_party/fatfs/doc/en/getfree.html
new file mode 100644
index 0000000..e81de0a
--- /dev/null
+++ b/third_party/fatfs/doc/en/getfree.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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_getfree</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_getfree</h2>
+<p>The f_getfree function gets number of the free clusters.</p>
+<pre>
+FRESULT f_getfree (
+ const char* <em>Path</em>, /* Root directory of the drive */
+ DWORD* <em>Clusters</em>, /* Pointer to the variable to store number of free clusters */
+ FATFS** <em>FileSystemObject</em> /* Pointer to pointer to file system object */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Path</dt>
+<dd>Pinter to the null-terminated string that specifies the <a href="filename.html">root directory</a> of the logical drive. Always specify a null-string for Tiny-FatFs.</dd>
+<dt>Clusters</dt>
+<dd>Pointer to the DWORD variable to store number of free clusters.</dd>
+<dt>FileSystemObject</dt>
+<dd>Pointer to the pointer that to be stored the pointer to corresponding file system object.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded. The <tt><em>*Clusters</em></tt> havs number of free clusters and <tt><em>*FileSystemObject</em></tt> points the file system object.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</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_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_NO_FILESYSTEM</dt>
+<dd>There is no valid FAT partition on the disk.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Descriptions</h4>
+<p>The f_getfree function gets number of free clusters on the drive. The <tt>sects_clust</tt> member in the file system object refreting number of sectors per cluster, so that the free space in unit of sector can be calcurated with this. When _USE_FSINFO option is enabled, this function can return inaccurate free cluster count on FAT32 volume. When _USE_FSINFO option is disabled, this function will take a time on FAT32 volume.</p>
+<p>This function is not supported in read-only configuration and minimization level of &gt;= 1.</p>
+</div>
+
+
+<div class="para">
+<h4>Samples Code</h4>
+<pre>
+ FATFS *fs;
+ DWORD clust;
+
+
+ // Get free clusters
+ res = f_getfree("", &clust, &fs);
+ if (res) die(res);
+
+ // Get free space
+ printf("%lu KB total disk space.\n"
+ "%lu KB available on the disk.\n",
+ (DWORD)(fs->max_clust - 2) * fs->sects_clust / 2,
+ clust * fs->sects_clust / 2);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/lseek.html b/third_party/fatfs/doc/en/lseek.html
new file mode 100644
index 0000000..a60bfc2
--- /dev/null
+++ b/third_party/fatfs/doc/en/lseek.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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_lseek</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_lseek</h2>
+<p>The f_lseek functione moves the file read/write pointer of an open file object.</p>
+<pre>
+FRESULT f_lseek (
+ FIL* <em>FileObject</em>, /* Pointer to the file object structure *
+ DWORD <em>Offset</em> /* File offset in unit of byte *
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object.</dd>
+<dt>Offset</dt>
+<dd>Number of bytes where from start of 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_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</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_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_lseek function moves the file R/W pointer of an open file. The offset can be specified in only origin from top of the file. When an offset above the file size is specified in write mode, the file is extended to the offset and the data in the extended area is undefined. After the function succeeded, member fptr in the file object should be checked in order to make sure the R/W pointer has been moved correctry. In case of fptr is less than Offset, any of the followings has been occured.</p>
+<ul>
+<li>In read-only mode, the Offset was clipped in file size.</li>
+<li>The drive gets full during the file extending process.</li>
+<li>There is any error in the FAT structure.</li>
+</ul>
+<p>This function is not supported in minimization level of &gt;= 3.</p></div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ // Move to offset of 5000 from top of the file.
+ res = f_lseek(&file, 5000);
+
+ // Forward 3000 bytes
+ res = f_lseek(&file, file.fptr + 3000);
+
+ // Rewind 2000 bytes (take care on overflow)
+ res = f_lseek(&file, file.fptr - 2000);
+
+ // Move to end of the file
+ res = f_lseek(&file, file.fsize);
+</pre>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/mkdir.html b/third_party/fatfs/doc/en/mkdir.html
new file mode 100644
index 0000000..5dcff74
--- /dev/null
+++ b/third_party/fatfs/doc/en/mkdir.html
@@ -0,0 +1,83 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_mkdir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_mkdir</h2>
+<p>The f_mkdir function creates a new directory.</p>
+<pre>
+FRESULT f_mkdir (
+ const char* <em>DirName</em> /* Pointer to the directory name */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>DirName</dt>
+<dd>Pointer to the null-terminated string that specifies the <a href="filename.html">directory name</a> to create. </dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Value</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The path name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_DENIED</dt>
+<dd>The directory cannot be created due to directory table or disk is full.</dd>
+<dt>FR_EXIST</dt>
+<dd>A file or directory that has same name is already existing.</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_WRITE_PROTECTED</dt>
+<dd>The medium is write protected.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</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 f_mkdir function creates a new directory. This function is not supported in read-only configuration and minimization level of &gt;= 1.</p>
+<p>
+</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ res = f_mkdir("sub1");
+ if (res) die(res);
+ res = f_mkdir("sub1/sub2");
+ if (res) die(res);
+ res = f_mkdir("sub1/sub2/sub3");
+ if (res) die(res);
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/mkfs.html b/third_party/fatfs/doc/en/mkfs.html
new file mode 100644
index 0000000..35ae3b9
--- /dev/null
+++ b/third_party/fatfs/doc/en/mkfs.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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_mkfs</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_mkfs</h2>
+<p>The f_mkfs fucntion creates a file system on the drive.</p>
+<pre>
+FRESULT f_mkfs (
+ BYTE <em>Drive</em>, /* Logical drive number */
+ BYTE <em>PartitioningRule</em>, /* Partitioning rule */
+ BYTE <em>AllocSize</em> /* Allocation unit size */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Logical drive number (0-9) to be formatted.</dd>
+<dt>PartitioningRule</dt>
+<dd>When 0 is given, a partition table is created into first sector on the drive and then the file system is created on the partition. This is called FDISK format. When 1 is given, the file system starts from the first sector without partition table. This is often called super floppy (SFD) format.</dd>
+<dt>AllocSize</dt>
+<dd>Specifies allocation unit size (number of sectors per cluster). The value must be power of 2 in range of from 1 to 64.</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_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_NOT_READY</dt>
+<dd>The drive cannot work due to any reason.</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>The drive is write protected.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</dd>
+<dt>FR_MKFS_ABORTED</dt>
+<dd>The function aborted before start in format due to a reason as follows.
+<ul>
+<li>The disk size is too small.</li>
+<li>Invalid parameter was given to any parameter.</li>
+<li>Not allowable cluster size for this drive. This can occure when number of clusters becomes around 0xFF7 and 0xFFF7.</li>
+</ul>
+</dd>
+</dl>
+</div>
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_mkfs function creates a FAT file system on the drive. There are two partitioning rules, FDISK and SFD, for removable media. It can be selected with a parameter and FDISK format is recommended for most case. This function currently does not support multiple partition, so that existing partitions on the physical dirve will be deleted and re-created a partition occupies entire disk space.</p>
+<p>The FAT type, FAT12/FAT16/FAT32, is determined by only how many clusters on the drive and nothing else, according to FAT specification. Thus which FAT type is selected, is depends on the drive size and specified cluster size. The cluster size affects performance of file system and large cluster increases the performance, so that 64 sectors per cluster is recommended except for small drive.</p>
+<p>This function is supported on only FatFs with _USE_MKFS option.<p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/mount.html b/third_party/fatfs/doc/en/mount.html
new file mode 100644
index 0000000..9a14392
--- /dev/null
+++ b/third_party/fatfs/doc/en/mount.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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_mount</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_mount</h2>
+<p>The f_mount fucntion registers/unregisters a work area to the FatFs module.</p>
+<pre>
+FRESULT f_mount (
+ BYTE <em>Drive</em>, /* Logical drive number */
+ FATFS* <em>FileSystemObject</em> /* Pointer to the work area */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>Drive</dt>
+<dd>Logical drive number (0-9) to register/unregister the work area. Always 0 for Tiny-FatFs.</dd>
+<dt>FileSystemObject</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_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_mount function registers/unregisters a work area to the FatFs module. The work area must be given to the logical drive with this function before using any file function. To unregister a work area, specify a NULL to the <em>FileSystemObject</em>, and then the work area can be discarded.</p>
+<p>This function only initializes the work area and registers its address to the internal table, any access to the disk I/O layer does not occure. Actual mounting process is performed in any other file funcitons with path name when it is needed.<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_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/mountdrv.html b/third_party/fatfs/doc/en/mountdrv.html
new file mode 100644
index 0000000..7cc6bbf
--- /dev/null
+++ b/third_party/fatfs/doc/en/mountdrv.html
@@ -0,0 +1,57 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_mountdrv</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_mountdrv</h2>
+<p>The f_mountdrv forces the partition mounted.</p>
+<pre>
+FRESULT f_mountdrv (void);
+</pre>
+</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 disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>Any error occured in low level disk I/O.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>FatFs module is not enabled.</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 f_mountdrv forces the partition mounted (initializes <tt>FATFS</tt> structure). The file system is initialized automatically in accordance with the necessity when any file function is called. This function should not be used except for recovering <tt>FR_INCORRECT_DISK_CHANGE</tt> error. Using this function, while any file is opened, can destroy the file system.</p>
+<p>In this function, following processes are executed.</p><br>
+<ul>
+<li>Initializes lower level layer (disk I/O module).</li>
+<li>Searches a FAT boot record in order of sector 0 (as SFD format) and first primary partition (as FDISK format).</li>
+<li>Initializes file system object (<tt>FATFS</tt> structure).</li>
+</ul>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/open.html b/third_party/fatfs/doc/en/open.html
new file mode 100644
index 0000000..d8cc7ff
--- /dev/null
+++ b/third_party/fatfs/doc/en/open.html
@@ -0,0 +1,136 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_open</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_open</h2>
+<p>The f_open function creates a <em>file object</em> to be used to access the file.</p>
+<pre>
+FRESULT f_open (
+ FIL* <em>FileObject</em>, /* Pointer to the blank file object structure */
+ const char* <em>FileName</em>, /* Pointer to the file neme */
+ BYTE <em>ModeFlags</em> /* Mode flags */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the file object structure to be created. After the f_open funciton succeeded, the file can be accessed with the file object structure until it is closed.</dd>
+<dt>FileName</dt>
+<dd>Pointer to a null-terminated string that specifies the <a href="filename.html">file name</a> to create or open.</dd>
+<dt>ModeFlags</dt>
+<dd>Specifies the type of access and open method for the file. It is specified by a combination of following flags.<br>
+<table class="lst">
+<tr><th>Value</th><th>Description</th></tr>
+<tr><td>FA_READ</td><td>Specifies read access to the object. Data can be read from the file.<br>Combine with FA_WRITE for read-write access.</td></tr>
+<tr><td>FA_WRITE</td><td>Specifies write access to the object. Data can be written to the file.<br>Combine with FA_READ for read-write access.</td></tr>
+<tr><td>FA_OPEN_EXISTING</td><td>Opens the file. The function fails if the file is not existing.</td></tr>
+<tr><td>FA_OPEN_ALWAYS</td><td>Opens the file, if it is existing. If not, the function creates the new file.</td></tr>
+<tr><td>FA_CREATE_NEW</td><td>Creates a new file. The function fails if the file is already existing.</td></tr>
+<tr><td>FA_CREATE_ALWAYS</td><td>Creates a new file. If the file is existing, it is truncated and overwritten.</td></tr>
+</table>
+</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded and the file object is valid.</dd>
+<dt>FR_NO_FILE</dt>
+<dd>Could not find the file.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The file name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_EXIST</dt>
+<dd>The file is already existing.</dd>
+<dt>FR_DENIED</dt>
+<dd>The required access was denied due to any of following reasons: write mode open of a file that has read-only attribute, file creation under existing a same name directory or read-only file, cannot be created due to the directory table or disk full.</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_WRITE_PROTECTED</dt>
+<dd>Write mode open or creation under the medium is write protected.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</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 created file object is used for subsequent calls to refer to the file. When close an open file object, use <a href="close.html">f_close</a> function.</p>
+<p>Before using any file function, work area (file system object) must be given to each logical drive with <a href="mount.html">f_mount</a> function. All file functions can work after this procedure.</p>
+<p>The mode flags, <tt>FA_WRITE, FA_CREATE_ALWAYS, FA_CREATE_NEW, FA_OPEN_ALWAYS</tt>, are not supported in read-only configuration.</p>
+</div>
+
+
+<div class="para">
+<h4>Example (File Copy)</h4>
+<pre>
+void main ()
+{
+ FATFS fs; // Work area (file system object) for logical drive
+ FIL fsrc, fdst; // file objects
+ BYTE buffer[4096]; // file copy buffer
+ FRESULT res; // FatFs function common result code
+ WORD br, bw; // File R/W count
+
+
+ // Register a work area to logical drive 0
+ f_mount(0, &fs);
+
+ // Open source file
+ res = f_open(&fsrc, "srcfile.dat", FA_OPEN_EXISTING | FA_READ);
+ if (res) die(res);
+
+ // Create destination file
+ res = f_open(&fdst, "dstfile.dat", FA_CREATE_ALWAYS | FA_WRITE);
+ if (res) die(res);
+
+ // Copy source to destination
+ for (;;) {
+ res = f_read(&fsrc, buffer, sizeof(buffer), &br);
+ if (res || br == 0) break; // error or eof
+ res = f_write(&fdst, buffer, br, &bw);
+ if (res || bw &lt; br) break; // error or disk full
+ }
+
+ // Close all files
+ f_close(&fsrc);
+ f_close(&fdst);
+
+ // Unregister a work area before discard it
+ f_mount(0, NULL);
+}
+</pre>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="read.html">f_read</a>, <a href="write.html">f_write</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a>, <a href="sfatfs.html">FATFS</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/opendir.html b/third_party/fatfs/doc/en/opendir.html
new file mode 100644
index 0000000..dfe02cf
--- /dev/null
+++ b/third_party/fatfs/doc/en/opendir.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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_opendir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_opendir</h2>
+<p>The f_opendir function opens a directory.</p>
+<pre>
+FRESULT f_opendir (
+ DIR* <em>DirObject</em>, /* Pointer to the blank directory object structure */
+ const char* <em>DirName</em> /* Pointer to the directory name */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>DirObject</dt>
+<dd>Pointer to the blank directory object to be created.</dd>
+<dt>DirName</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 directory.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The path name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</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_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</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 f_opendir 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. This function is not supported in minimization level of &gt;=2.</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_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/read.html b/third_party/fatfs/doc/en/read.html
new file mode 100644
index 0000000..0c03971
--- /dev/null
+++ b/third_party/fatfs/doc/en/read.html
@@ -0,0 +1,71 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_read</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_read</h2>
+<p>The f_read function reads data from a file.</p>
+<pre>
+FRESULT f_read (
+ FIL* <em>FileObject</em>, /* Pointer to the file object structure */
+ void* <em>Buffer</em>, /* Pointer to the buffer to store read data */
+ WORD <em>ByteToRead</em>, /* Number of bytes to read */
+ WORD* <em>ByteRead</em> /* Pointer to the variable to return number of bytes read */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object.</dd>
+<dt>Buffer</dt>
+<dd>Pointer to the buffer to store read data</dd>
+<dt>ByteToRead</dt>
+<dd>Number of bytes to read</dd>
+<dt>ByteRead</dt>
+<dd>Pointer to the WORD variable to return number of bytes read.</dd>
+</dt>
+</div>
+
+
+<div class="para">
+<h4>Return Values</h4>
+<dl class="ret">
+<dt>FR_OK (0)</dt>
+<dd>The function succeeded.</dd>
+<dt>FR_DENIED</dt>
+<dd>The function denied due to the file has been opened in write only mode.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</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_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The file pointer in the file object increases in number of bytes read. The <tt>ByteRead</tt> will become less than <tt>ByteToRead</tt> when the read pointer reached to end of the file or any error occured during the read operation.</p>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="write.html">f_write</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/readdir.html b/third_party/fatfs/doc/en/readdir.html
new file mode 100644
index 0000000..5bf0004
--- /dev/null
+++ b/third_party/fatfs/doc/en/readdir.html
@@ -0,0 +1,89 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_readdir</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_readdir</h2>
+<p>The f_readdir function reads directory entries.</p>
+<pre>
+FRESULT f_readdir (
+ DIR* <em>DirObject</em>, /* Pointer to the directory object structure */
+ FILINFO* <em>FileInfo</em> /* Pointer to the file information structure */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>DirObject</dt>
+<dd>Pointer to the open directory strcture.</dd>
+<dt>FileInfo</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_NOT_READY</dt>
+<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</dd>
+<dt>FR_INVALID_OBJECT</dt>
+<dd>The directory object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_readdir function reads directory entries in sequence. All items in the directory can be read by calling f_readdir function repeatedly. When all directory items have been read and no item to read, the function returns a null string into <tt>f_name[]</tt> member without any error. For details of the file informations, refer to the <tt>FILINFO</tt>. This function is not supported in minimization level of &gt;=2.</p>
+</div>
+
+
+<div class="para">
+<h4>Sample Code</h4>
+<pre>
+void scan_files (char* path)
+{
+ FILINFO finfo;
+ DIR dirs;
+ int i;
+
+ if (f_opendir(&dirs, path) == FR_OK) {
+ i = strlen(path);
+ while ((f_readdir(&dirs, &finfo) == FR_OK) && finfo.fname[0]) {
+ if (finfo.fattrib & AM_DIR) {
+ sprintf(path+i, "/%s", &finfo.fname[0]);
+ scan_files(path);
+ *(path+i) = '\0';
+ } else {
+ printf("%s/%s\n", path, &finfo.fname[0]);
+ }
+ }
+ }
+}
+</pre>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="opendir.html">f_opendir</a>, <a href="stat.html">f_stat</a>, <a href="sfileinfo.html">FILINFO</a>, <a href="sdir.html">DIR</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/rename.html b/third_party/fatfs/doc/en/rename.html
new file mode 100644
index 0000000..83bc6a2
--- /dev/null
+++ b/third_party/fatfs/doc/en/rename.html
@@ -0,0 +1,84 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_rename</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_rename</h2>
+<p>Rename file or directory.</p>
+<pre>
+FRESULT f_rename (
+ const char* <em>OldName</em>, /* Pointer to old file/directory name */
+ const char* <em>NewName</em> /* Pointer to new file/directory name */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>OldName</dt>
+<dd>Pointer to a null-terminated string specifies the old <a href="filename.html">file/directory name</a> to be renamed.</dd>
+<dt>NewName</dt>
+<dd>Pointer to a null-terminated string specifies the new file/directory name without drive number. Existing object nannot be specified.</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 nor directory.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The file name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</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_DENIED</dt>
+<dd>The new name could not be created due to any reason.</dd>
+<dt>FR_WRITE_PROTECTED</dt>
+<dd>The medium is write protected.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</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>Rename a file or directory and can move it to other directory. Logical drive number is determined by old name, new name must not contain logical drive number. This function is not supported in read-only configuration or minimization level of &gt;= 1.</p>
+<p>Note: In this revision, moving any directory to other directory collapses the FAT structure on the disk.</p>
+</div>
+
+
+<div class="para">
+<h4>Example</h4>
+<pre>
+ // Rename file or directory
+ f_rename("oldname.txt", "newname.txt");
+
+ // Rename and move file to other directory simultaneously
+ f_rename("oldname.txt", "dir1/newname.txt");
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/sdir.html b/third_party/fatfs/doc/en/sdir.html
new file mode 100644
index 0000000..a60b3c9
--- /dev/null
+++ b/third_party/fatfs/doc/en/sdir.html
@@ -0,0 +1,42 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>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 f_oepndir and f_readdir functions.</p>
+<h4>FatFs</h4>
+<pre>
+typedef struct _DIR {
+ WORD id; /* Owner file system mount ID (inverted) */
+ WORD index; /* Current index */
+ FATFS* fs; /* Pointer to the owner file system object */
+ DWORD sclust; /* Start cluster */
+ DWORD clust; /* Current cluster */
+ DWORD sect; /* Current sector */
+} DIR;
+</pre>
+<h4>Tiny-FatFs</h4>
+<pre>
+typedef struct _DIR {
+ WORD id; /* Owner file system mount ID (inverted) */
+ WORD index; /* Current index */
+ FATFS* fs; /* Pointer to the owner file system object */
+ CLUST sclust; /* Start cluster */
+ CLUST clust; /* Current cluster */
+ DWORD sect; /* Current sector */
+} DIR;
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/sfatfs.html b/third_party/fatfs/doc/en/sfatfs.html
new file mode 100644
index 0000000..0878619
--- /dev/null
+++ b/third_party/fatfs/doc/en/sfatfs.html
@@ -0,0 +1,63 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - FATFS</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FATFS</h2>
+<p>The <tt>FATFS</tt> structure holds dynamic work area of individual logical drives. It is given by application program and registerd/unregisterd to the FatFs module with f_mount function. Following members are in standard configuration. There is no member that can be changed from the application program.</p>
+<h4>FatFs</h4>
+<pre>
+typedef struct _FATFS {
+ WORD id; /* File system mount ID */
+ WORD n_rootdir; /* Number of root directory entries */
+ DWORD winsect; /* Current sector appearing in the win[] */
+ DWORD sects_fat; /* Sectors per fat */
+ DWORD max_clust; /* Maximum cluster# + 1 */
+ DWORD fatbase; /* FAT start sector */
+ DWORD dirbase; /* Root directory start sector (cluster# for FAT32) */
+ DWORD database; /* Data start sector */
+ DWORD last_clust; /* Last allocated cluster */
+ DWORD free_clust; /* Number of free clusters */
+ BYTE fs_type; /* FAT type (0:Not mounted) */
+ BYTE sects_clust; /* Sectors per cluster */
+ BYTE n_fats; /* Number of FAT copies */
+ BYTE drive; /* Physical drive number */
+ BYTE winflag; /* win[] dirty flag (1:must be written back) */
+ BYTE pad1;
+ BYTE win[512]; /* Disk access window for Directory/FAT */
+} FATFS;
+</pre>
+
+<h4>Tiny-FatFs</h4>
+<pre>
+typedef struct _FATFS {
+ WORD id; /* File system mount ID */
+ WORD n_rootdir; /* Number of root directory entries */
+ DWORD winsect; /* Current sector appearing in the win[] */
+ DWORD fatbase; /* FAT start sector */
+ DWORD dirbase; /* Root directory start sector */
+ DWORD database; /* Data start sector */
+ CLUST sects_fat; /* Sectors per fat */
+ CLUST max_clust; /* Maximum cluster# + 1 */
+ CLUST last_clust; /* Last allocated cluster */
+ CLUST free_clust; /* Number of free clusters */
+ BYTE fs_type; /* FAT type (0:Not mounted) */
+ BYTE sects_clust; /* Sectors per cluster */
+ BYTE n_fats; /* Number of FAT copies */
+ BYTE winflag; /* win[] dirty flag (1:must be written back) */
+ BYTE win[512]; /* Disk access window for Directory/FAT/File */
+} FATFS;
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/sfile.html b/third_party/fatfs/doc/en/sfile.html
new file mode 100644
index 0000000..cdc2eeb
--- /dev/null
+++ b/third_party/fatfs/doc/en/sfile.html
@@ -0,0 +1,55 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - FIL</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FIL</h2>
+<p>The FIL structure (file object) holds state of a file. It is created by f_open function and discarded by f_close function. There is no member that can be changed by the application program.</p>
+
+<h4>FatFs</h4>
+<pre>
+typedef struct _FIL {
+ WORD id; /* Owner file system mount ID (inverted) */
+ BYTE flag; /* File status flags */
+ BYTE sect_clust; /* Left sectors in cluster */
+ FATFS* fs; /* Pointer to the owner file system object */
+ DWORD fptr; /* File R/W pointer */
+ DWORD fsize; /* File size */
+ DWORD org_clust; /* File start cluster */
+ DWORD curr_clust; /* Current cluster */
+ DWORD curr_sect; /* Current sector */
+ DWORD dir_sect; /* Sector containing the directory entry */
+ BYTE* dir_ptr; /* Ponter to the directory entry in the window */
+ BYTE buffer[512]; /* File R/W buffer */
+} FIL;
+</pre>
+
+<h4>Tiny-FatFs</h4>
+<pre>
+typedef struct _FIL {
+ WORD id; /* Owner file system mount ID (inverted) */
+ BYTE flag; /* File status flags */
+ BYTE sect_clust; /* Left sectors in cluster */
+ FATFS* fs; /* Pointer to owner file system */
+ DWORD fptr; /* File R/W pointer */
+ DWORD fsize; /* File size */
+ CLUST org_clust; /* File start cluster */
+ CLUST curr_clust; /* Current cluster */
+ DWORD curr_sect; /* Current sector */
+ DWORD dir_sect; /* Sector containing the directory entry */
+ BYTE* dir_ptr; /* Ponter to the directory entry in the window */
+} FIL;
+</pre>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/sfileinfo.html b/third_party/fatfs/doc/en/sfileinfo.html
new file mode 100644
index 0000000..f868d2f
--- /dev/null
+++ b/third_party/fatfs/doc/en/sfileinfo.html
@@ -0,0 +1,43 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - FILINFO</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>FILINFO</h2>
+<p>The <tt>FILINFO</tt> structure holds a file information returned by <tt>f_stat()</tt> and <tt>f_readdir()</tt>.</p>
+<pre>
+typedef struct _FILINFO {
+ DWORD fsize; // Size
+ WORD fdate; // Date
+ WORD ftime; // Time
+ BYTE fattrib; // Attribute
+ char fname[8+1+3+1]; // Name
+} 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.</dd>
+<dt>ftime</dt>
+<dd>Indicates the time that the file was modified or the directory was created.</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>, 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_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/stat.html b/third_party/fatfs/doc/en/stat.html
new file mode 100644
index 0000000..bd14356
--- /dev/null
+++ b/third_party/fatfs/doc/en/stat.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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_stat</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_stat</h2>
+<p>The f_stat gets the file status.</p>
+<pre>
+FRESULT f_stat (
+ const char* <em>FileName</em>, /* Pointer to the file or directory name */
+ FILINFO* <em>FileInfo</em> /* Pointer to the FILINFO structure */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>Pointer to the null-terminated string that specifies the <a href="filename.html">file or directory</a> to get its information.</dd>
+<dt>FileInfo</dt>
+<dd>Pointer to the blank <tt>FILINFO</tt> structure to store the information.</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 directory.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The file name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</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_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</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 f_stat gets the information of a file or directory. For details of the infomation, refer to the <tt>FILINFO</tt> structure. This function is not supported in minimization level of &gt;= 1.</p>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="opendir.html">f_opendir</a>, <a href="readdir.html">f_readdir</a>, <a href="sfileinfo.html">FILINFO</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/sync.html b/third_party/fatfs/doc/en/sync.html
new file mode 100644
index 0000000..2f5afbe
--- /dev/null
+++ b/third_party/fatfs/doc/en/sync.html
@@ -0,0 +1,60 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_sync</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_sync</h2>
+<p>The f_sync function flushes the cached information of a wriiting file.</p>
+<pre>
+FRESULT f_sync (
+ FIL* <em>FileObject</em> /* Pointer to the file object */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object to be flushed.</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_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</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_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The f_sync function performs the same process as f_close function but the file is left opened and can continue read/write/seek operations to the file. This is suitable for applications that open files for a long time in writing mode, such as data logger. Performing f_sync of periodic or immediataly after f_write can minimize risk of data loss due to sudden blackout or unintentional disk removal. This function is not supported in read-only configuration.</p>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="close.html">f_close</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/unlink.html b/third_party/fatfs/doc/en/unlink.html
new file mode 100644
index 0000000..d0652b5
--- /dev/null
+++ b/third_party/fatfs/doc/en/unlink.html
@@ -0,0 +1,69 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_unlink</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_unlink</h2>
+<p>The f_unlink removes file or directory.</p>
+<pre>
+FRESULT f_unlink (
+ const char* <em>FileName</em> /* Pointer to the file or directory name */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameters</h4>
+<dl class="par">
+<dt>FileName</dt>
+<dd>Pointer to the null-terminated string that specifies a <a href="filename.html">file or directory</a> to be removed.</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 directory.</dd>
+<dt>FR_NO_PATH</dt>
+<dd>Could not find the path.</dd>
+<dt>FR_INVALID_NAME</dt>
+<dd>The path name is invalid.</dd>
+<dt>FR_INVALID_DRIVE</dt>
+<dd>The drive number is invalid.</dd>
+<dt>FR_DENIED</dt>
+<dd>The function was denied due to either of following reasons: the file or directory has read-only attribute, the directory is not empty.</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_WRITE_PROTECTED</dt>
+<dd>The medium is write protected.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</dd>
+<dt>FR_NOT_ENABLED</dt>
+<dd>The logical drive has no work area.</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 f_unlink function removes a file or directory. In read-only configuration or minimization level is &gt;= 1, this function is not supported.</p>
+</div>
+
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>
diff --git a/third_party/fatfs/doc/en/write.html b/third_party/fatfs/doc/en/write.html
new file mode 100644
index 0000000..dcd4e84
--- /dev/null
+++ b/third_party/fatfs/doc/en/write.html
@@ -0,0 +1,71 @@
+<!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="FatFs" href="../00index_e.html">
+<link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">
+<title>FatFs - f_write</title>
+</head>
+
+<body>
+
+<div class="para">
+<h2>f_write</h2>
+<p>The f_write writes data to a file.</p>
+<pre>
+FRESULT f_write (
+ FIL* <em>FileObject</em>, /* Pointer to the file object structure */
+ const void* <em>Buffer</em>, /* Pointer to the data to be written */
+ WORD <em>ByteToWrite</em>, /* Number of bytes to write */
+ WORD* <em>ByteWritten</em> /* Pointer to the variable to return number of bytes written */
+);
+</pre>
+</div>
+
+<div class="para">
+<h4>Parameter</h4>
+<dl class="par">
+<dt>FileObject</dt>
+<dd>Pointer to the open file object structure.</dd>
+<dt>Buffer</dt>
+<dd>Pointer to the data to be written.</dd>
+<dt>ByteToWrite</dt>
+<dd>Specifies number of bytes to write.</dd>
+<dt>ByteWritten</dt>
+<dd>Pointer to the WORD variable to return number of bytes written.</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_DENIED</dt>
+<dd>The function denied due to the file has been opened in read only mode.</dd>
+<dt>FR_RW_ERROR</dt>
+<dd>The function failed due to a disk error or an internal error.</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_INVALID_OBJECT</dt>
+<dd>The file object is invalid.</dd>
+</dl>
+</div>
+
+
+<div class="para">
+<h4>Description</h4>
+<p>The read/write pointer in the file object is increased in number of bytes written. The <tt>ByteWritten</tt> will become less than <tt>ByteToWrite</tt> when disk gets full during write function. This function is not supported in read-only configuration.</p>
+</div>
+
+
+<div class="para">
+<h4>References</h4>
+<p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>
+</div>
+
+<p class="foot"><a href="../00index_e.html">Return</a></p>
+</body>
+</html>