fatfs v0.02 Jun 01, 2006:
- Added FAT12. Removed unbuffered mode. - Fixed a problem on small (<32M) patition.
This commit is contained in:
1 parent
4f7376e6aa
commit
238747ef97
56 files changed
+424
-336
No files matched your search
+2
-1
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -60,7 +61,7 @@ FRESULT f_chmod (
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_INCORRECT_DISK_CHANGE</dt>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file opend, has been occured.</dd>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file is opend, has been occured.</dd>
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>FatFs module has not been enabled.</dd>
|
||||
<dt>FR_NO_FILESYSTEM</dt>
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -36,7 +37,7 @@ FRESULT f_close (
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_INCORRECT_DISK_CHANGE</dt>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file opend, has been occured.</dd>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file is opend, has been occured.</dd>
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>FatFs module is not enabled.</dd>
|
||||
</dl>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -38,7 +39,7 @@ FRESULT f_getfree (
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_INCORRECT_DISK_CHANGE</dt>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file opend, has been occured.</dd>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file is opend, has been occured.</dd>
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>FatFs module has not been enabled.</dd>
|
||||
<dt>FR_NO_FILESYSTEM</dt>
|
||||
|
||||
+7
-8
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -36,12 +37,10 @@ FRESULT f_lseek (
|
||||
<dl class="ret">
|
||||
<dt>FR_OK</dt>
|
||||
<dd>The function succeeded.</dd>
|
||||
<dt>FR_ALIGN_ERROR</dt>
|
||||
<dd>Out of alignment. In unbuffered mode, specified offset must be aligned on 512 byte boundary.</dd>
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_INCORRECT_DISK_CHANGE</dt>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file opend, has been occured.</dd>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file is opend, has been occured.</dd>
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>FatFs module has not been enabled.</dd>
|
||||
</dl>
|
||||
@@ -59,15 +58,15 @@ FRESULT f_lseek (
|
||||
<pre>
|
||||
// Move to offset of 5000 from top of file.
|
||||
res = f_lseek(&file, 5000);
|
||||
if (res) die(res);
|
||||
|
||||
// Move to 3000 bytes front of current offset.
|
||||
// Forward 3000 bytes
|
||||
res = f_lseek(&file, file.fptr + 3000);
|
||||
if (res) die(res);
|
||||
|
||||
// Move to 2000 bytes back of current offset.
|
||||
// Rewind 2000 bytes
|
||||
res = f_lseek(&file, file.fptr - 2000);
|
||||
if (res) die(res);
|
||||
|
||||
// Move to end of file
|
||||
res = f_lseek(&file, 0xFFFFFFFF);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -46,7 +47,7 @@ FRESULT f_mkdir (
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_INCORRECT_DISK_CHANGE</dt>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file opend, has been occured.</dd>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file is opend, has been occured.</dd>
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>FatFs module has not been enabled.</dd>
|
||||
<dt>FR_NO_FILESYSTEM</dt>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
|
||||
+15
-20
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -25,19 +26,18 @@ FRESULT f_open (
|
||||
<h4>Parameters</h4>
|
||||
<dl class="par">
|
||||
<dt>FileObject</dt>
|
||||
<dd>Pointer to the blank file object structure to be initialized. After the f_open function succeeded, the file can be accessed with the file object structure until it is closed. The member <tt>buffer</tt> in the structure must be initialized with the address of a 512 bytes file read/write buffer before or immediataly after the f_open function. The initialization is not needed when <tt>FA_UNBUFFERED</tt> flag has been specified.</dd>
|
||||
<dd>Pointer to the blank file object structure to be initialized. After the f_open() 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 specifies the full-path file name to create or open. The directory separator is <tt>'/'</tt>. Because the FatFs module does not have a concept of current directory, a full-path name that followed from the root directory must be used. Leading space charactors are skipped if exist and heading <tt>'/'</tt> can be exist or omitted.</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></td>
|
||||
<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></td>
|
||||
<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></td>
|
||||
<tr><td>FA_UNBUFFERED</td><td>This is for only FatFs module. When not specified, the file can be read/written in<br>stream I/O via the file read/write buffer pointed by member 'buffer' in the file<br>object. When specified, file read/write buffer is not used and number of bytes<br>to read/write must be integer multiple of 512. </td></td>
|
||||
<tr><td>FA_OPEN_EXISTING</td><td>Opens the file. The function fails if the file does not exist.</td></td>
|
||||
<tr><td>FA_CREATE_ALWAYS</td><td>Creates a new file. If the file exists, it is truncated and overwritten.</td></td>
|
||||
<tr><td>FA_OPEN_ALWAYS</td><td>Opens the file, if it exists. If the file does not exist, the function creates the file.</td></td>
|
||||
<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 does not exist.</td></tr>
|
||||
<tr><td>FA_CREATE_ALWAYS</td><td>Creates a new file. If the file exists, it is truncated and overwritten.</td></tr>
|
||||
<tr><td>FA_OPEN_ALWAYS</td><td>Opens the file, if it exists. If the file does not exist, the function creates the file.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -64,7 +64,7 @@ FRESULT f_open (
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_INCORRECT_DISK_CHANGE</dt>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file opend, has been occured.</dd>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file is opend, has been occured.</dd>
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>FatFs module has not been enabled.</dd>
|
||||
<dt>FR_NO_FILESYSTEM</dt>
|
||||
@@ -75,46 +75,41 @@ FRESULT f_open (
|
||||
|
||||
<div class="para">
|
||||
<h4>Description</h4>
|
||||
<p>To start to use the FatFs module, prepare a work area (<tt>FATFS</tt> structure), clear the structure and store the address to the global variable 'FatFs' to allocate the work area to the FatFs module. Then the FatFs module can work.</p>
|
||||
<p>Flags <tt>FA_WRITE, FA_CREATE_ALWAYS, FA_OPEN_ALWAYS</tt> are not supported in read-only configuration. Flag <tt>FA_UNBUFFERED</tt> is not supported in Tiny-FatFs.</p>
|
||||
<p>To start to use the FatFs module, prepare a work area (<tt>FATFS</tt> structure), clear it and set its address to the global pointer 'FatFs' to allocate the work area to the FatFs module. Then the FatFs module can work.</p>
|
||||
<p>Flags <tt>FA_WRITE, FA_CREATE_ALWAYS, FA_OPEN_ALWAYS</tt> are not supported in read-only configuration.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="para">
|
||||
<h4>Sample Code</h4>
|
||||
<h4>Example (File Copy)</h4>
|
||||
<pre>
|
||||
void main ()
|
||||
{
|
||||
FATFS fs; // FatFs work area
|
||||
FIL fsrc, fdst; // file structures
|
||||
BYTE fbuff[512*2]; // file r/w buffers (not required for Tiny-FatFs)
|
||||
BYTE buffer[4096]; // file copy buffer
|
||||
FRESULT res; // FatFs function common result code
|
||||
WORD br, bw; // File R/W count
|
||||
|
||||
|
||||
// Activate FatFs module
|
||||
// Give a work area for FatFs (activate module)
|
||||
memset(&fs, 0, sizeof(FATFS));
|
||||
FatFs = &fs;
|
||||
|
||||
// Open source file
|
||||
fsrc.buffer = fbuff+0; // (not required for Tiny-FatFs)
|
||||
res = f_open(&fsrc, "/srcfile.dat", FA_OPEN_EXISTING | FA_READ);
|
||||
if (res) die(res);
|
||||
|
||||
// Create destination file
|
||||
fdst.buffer = fbuff+512; // (not required for Tiny-FatFs)
|
||||
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) die(res);
|
||||
if (br == 0) break;
|
||||
if (res || br == 0) break;
|
||||
res = f_write(&fdst, buffer, br, &bw);
|
||||
if (res) die(res);
|
||||
if (bw < br) break;
|
||||
if (res || bw < br) break;
|
||||
}
|
||||
|
||||
// Close all files
|
||||
|
||||
+3
-2
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -35,7 +36,7 @@ FRESULT f_opendir (
|
||||
<h4>Return Values</h4>
|
||||
<dl class="ret">
|
||||
<dt>FR_OK</dt>
|
||||
<dd>The function succeeded. The <tt><em>DirObject</em></tt> structure is used for subsequent calls to read the directory items.</dd>
|
||||
<dd>The function succeeded. The <tt><em>DirObject</em></tt> structure is used for subsequent calls to read the directory entries.</dd>
|
||||
<dt>FR_NOPATH</dt>
|
||||
<dd>Could not find the path.</dd>
|
||||
<dt>FR_INVALID_NAME</dt>
|
||||
@@ -45,7 +46,7 @@ FRESULT f_opendir (
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_INCORRECT_DISK_CHANGE</dt>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file opend, has been occured.</dd>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file is opend, has been occured.</dd>
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>FatFs module has not been enabled.</dd>
|
||||
<dt>FR_NO_FILESYSTEM</dt>
|
||||
|
||||
+2
-3
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -44,8 +45,6 @@ FRESULT f_read (
|
||||
<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_ALIGN_ERROR</dt>
|
||||
<dd>The file has been opened in unbufferred mode but unaligned access was detected.</dd>
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_NOT_READY</dt>
|
||||
@@ -58,7 +57,7 @@ FRESULT f_read (
|
||||
|
||||
<div class="para">
|
||||
<h4>Description</h4>
|
||||
<p>The read/write pointer increases in number of bytes read. The <tt>ByteRead</tt> will be smaller than <tt>ByteToRead</tt> when the read pointer reached to end of the file or alignment error occured during the read operation. In unbufferred mode, last fractional bytes cannot be read due to <tt>FR_ALIGN_ERROR</tt>.</p>
|
||||
<p>The read/write pointer increases in number of bytes read. The <tt>ByteRead</tt> will be smaller than <tt>ByteToRead</tt> when the read pointer reached to end of the file or alignment error occured during the read operation.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
|
||||
+3
-2
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -11,7 +12,7 @@
|
||||
|
||||
<div class="para">
|
||||
<h2>FIL</h2>
|
||||
<p>The FIL structure holds state of a file and it is allocated by an application program. Only <tt>buffer</tt> member can be initialized by the application program.</p>
|
||||
<p>The FIL structure holds state of a file and it is allocated by an application program. There is no member that can be changed by the application program.</p>
|
||||
|
||||
<h4>FatFs</h4>
|
||||
<pre>
|
||||
@@ -23,9 +24,9 @@ typedef struct _FIL {
|
||||
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; // Pointer to 512 byte file R/W buffer
|
||||
BYTE flag; // File status flags
|
||||
BYTE sect_clust; // Left sectors in current cluster
|
||||
BYTE buffer[512]; // File R/W buffer
|
||||
} FIL;
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -45,7 +46,7 @@ FRESULT f_stat (
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_INCORRECT_DISK_CHANGE</dt>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file opend, has been occured.</dd>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file is opend, has been occured.</dd>
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>FatFs module has not been enabled.</dd>
|
||||
<dt>FR_NO_FILESYSTEM</dt>
|
||||
|
||||
+3
-2
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -36,7 +37,7 @@ FRESULT f_sync (
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_INCORRECT_DISK_CHANGE</dt>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file opend, has been occured.</dd>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file is opend, has been occured.</dd>
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>FatFs module has not been enabled.</dd>
|
||||
</dl>
|
||||
@@ -45,7 +46,7 @@ FRESULT f_sync (
|
||||
|
||||
<div class="para">
|
||||
<h4>Description</h4>
|
||||
<p>The f_sync writes back the cached information of a file being written into the disk. This is the same function as f_close but the file is left opened and can continue the file access. This is suitable for an application of data logger that opens a file for long time in writing mode. The f_sync of periodic or immediataly after f_wriete can minimize the lost data due to an unintentional black out or disk removal. This function is not supported in read-only configuration.</p>
|
||||
<p>The f_sync() writes back the cached information of the file being written. This performs the same function as f_close() but the file is left opened and can continue file read/write 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>
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -48,7 +49,7 @@ FRESULT f_unlink (
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_INCORRECT_DISK_CHANGE</dt>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file opend, has been occured.</dd>
|
||||
<dd>Incorrect disk removal, such as a medium change during any file is opend, has been occured.</dd>
|
||||
<dt>FR_NOT_ENABLED</dt>
|
||||
<dd>FatFs module has not been enabled.</dd>
|
||||
<dt>FR_NO_FILESYSTEM</dt>
|
||||
|
||||
+2
-3
@@ -3,6 +3,7 @@
|
||||
<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>
|
||||
@@ -44,8 +45,6 @@ FRESULT f_write (
|
||||
<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_ALIGN_ERROR</dt>
|
||||
<dd>The file has been opened in unbufferred mode but unaligned access was detected.</dd>
|
||||
<dt>FR_RW_ERROR</dt>
|
||||
<dd>Any error occured in low level disk I/O.</dd>
|
||||
<dt>FR_NOT_READY</dt>
|
||||
@@ -58,7 +57,7 @@ FRESULT f_write (
|
||||
|
||||
<div class="para">
|
||||
<h4>Description</h4>
|
||||
<p>The read/write pointer increases in number of bytes written. The <tt>ByteWritten</tt> will be smaller than <tt>ByteToWrite</tt> when disk full or alignment error occured during write function. This function is not supported in read only configuration.</p>
|
||||
<p>The read/write pointer increases in number of bytes written. The <tt>ByteWritten</tt> will be smaller than <tt>ByteToWrite</tt> when disk gets full during write function. This function is not supported in read only configuration.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user