FatFS R0.10b, released May 19, 2014

This commit is contained in:
Christopher Williams
2015-01-31 09:24:04 -07:00
parent 935031e4e5
commit 762b341574
75 changed files with 812 additions and 704 deletions
+11 -11
View File
@@ -13,10 +13,10 @@
<div class="para func">
<h2>f_mount</h2>
<p>The f_mount fucntion registers/unregisters file system object (work area) to the FatFs module.</p>
<p>The f_mount fucntion registers/unregisters file system object to the FatFs module.</p>
<pre>
FRESULT f_mount (
FATFS* <span class="arg">fatfs</span>, <span class="c">/* [IN] File system object */</span>
FATFS* <span class="arg">fs</span>, <span class="c">/* [IN] File system object */</span>
const TCHAR* <span class="arg">path</span>, <span class="c">/* [IN] Logical drive number */</span>
BYTE <span class="arg">opt</span> <span class="c">/* [IN] Initialization option */</span>
);
@@ -26,12 +26,12 @@ FRESULT f_mount (
<div class="para arg">
<h4>Parameters</h4>
<dl class="par">
<dt>fatfs</dt>
<dd>Pointer to the file system object to be registered. Null pointer unregisters the registered file system object.</dd>
<dt>fs</dt>
<dd>Pointer to the new file system object to be registered. Null pointer unregisters the registered file system object.</dd>
<dt>path</dt>
<dd>Pointer to the null-terminated string that specifies the <a href="filename.html">logical drive</a>. If there is no drive number, it means the default drive.</dd>
<dd>Pointer to the null-terminated string that specifies the <a href="filename.html">logical drive</a>. The string with no drive number means the default drive.</dd>
<dt>opt</dt>
<dd>Initialization option. 0: Do not mount now (to be mounted later), 1: Force mounted the volume to check if the volume is available.</dd>
<dd>Initialization option. 0: Do not mount now (to be mounted later), 1: Force mounted the volume to check if the FAT volume is available.</dd>
</dl>
</div>
@@ -53,17 +53,17 @@ FRESULT f_mount (
<ol>
<li>Determines the logical drive which specified by <tt class="arg">path</tt>.</li>
<li>Clears and unregisters the regsitered work area of the drive.</li>
<li>Clears and registers the work area to the drive if <tt class="arg">fatfs</tt> is not NULL.</li>
<li>Clears and registers the new work area to the drive if <tt class="arg">fs</tt> is not NULL.</li>
<li>Performs volume mount process to the drive if forced mount is specified.</li>
</ol>
<p>The file system object is the work area needed for each logical drive. It must be given to the logical drive with this function prior to use any other file functions. To unregister a work area, specify a NULL to the <tt class="arg">fatfs</tt>, and then the work area can be discarded. </p>
<p>The file system object is the work area needed for each logical drive. It must be given to the logical drive with this function prior to use any other file functions except for <tt>f_fdisk()</tt> function. To unregister a work area, specify a NULL to the <tt class="arg">fs</tt>, and then the work area can be discarded.</p>
<p>If forced mount is not specified, this function always succeeds regardless of the physical drive status due to delayed mount feature. It only clears (de-initializes) the given work area and registers its address to the internal table. No activity of the physical drive in this function. It can also be used to force de-initialized the registered work area of a logical drive. The volume mount processes, initialize the corresponding physical drive, find the FAT volume in it and initialize the work area, is performed in the subsequent file access functions when either or both of following condition is true.</p>
<ul>
<li>File system object is not initialized. It is cleared by <tt>f_mount()</tt>.</li>
<li>Physical drive is not initialized. It is de-initialized by system reset or media change.</li>
<li>Physical drive is not initialized. It is de-initialized by system reset or media removal.</li>
</ul>
<p>If the function with forced mount failed, it means that the file system object is registered but the volume is currently not available. Mount process will also be attempted in subsequent file access functions.</p>
<p>If implementation of the disk I/O layer lacks media change detection, application program needs to perform a <tt>f_mount()</tt> after media change to force cleared the file system object.</p>
<p>If the function with forced mount failed, it means that the file system object has been registered successfully but the volume is currently not ready to use. Mount process will also be attempted in subsequent file access functions.</p>
<p>If implementation of the disk I/O layer lacks media change detection, application program needs to perform a <tt>f_mount()</tt> after each media change to force cleared the file system object.</p>
</div>