]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - fatfs/documents/doc/write.html
Import fatfs R0.15
[z180-stamp.git] / fatfs / documents / doc / write.html
index d451255e62928ab73144b15d966129219799fa0a..3d166742f4be6b7f4f2d2910f17436240f8463ed 100644 (file)
@@ -32,9 +32,9 @@ FRESULT f_write (
 <dt>buff</dt>\r
 <dd>Pointer to the data to be written.</dd>\r
 <dt>btw</dt>\r
-<dd>Specifies number of bytes to write in range of <tt>UINT</tt> type.</dd>\r
+<dd>Specifies number of bytes to write in range of <tt>UINT</tt> type. If the data needs to be written fast, it should be written in large chunk as possible.</dd>\r
 <dt>bw</dt>\r
-<dd>Pointer to the <tt>UINT</tt> variable to return the number of bytes written. This value is always valid after the function call regardless of the function return code.</dd>\r
+<dd>Pointer to the <tt>UINT</tt> variable that receives the number of bytes written. This value is always valid after the function call regardless of the function return code. If the return value is equal to <tt class="arg">btw</tt>, the function return code should be <tt>FR_OK</tt>.</dd>\r
 </dl>\r
 </div>\r
 \r
@@ -54,7 +54,7 @@ FRESULT f_write (
 \r
 <div class="para desc">\r
 <h4>Description</h4>\r
-<p>The function starts to write data to the file at the position pointed by the read/write pointer. The read/write pointer advances as number of bytes written. After the function succeeded, <tt class="arg">*bw</tt> should be checked to detect the disk full. In case of <tt class="arg">*bw</tt> &lt; <tt class="arg">btw</tt>, it means the volume got full during the write operation. The function can take a time when the volume is full or close to full.</p>\r
+<p>The function starts to write data to the file at the file offset pointed by read/write pointer. The read/write pointer advances as number of bytes written. After the function succeeded, <tt class="arg">*bw</tt> should be checked to detect the disk full. In case of <tt class="arg">*bw</tt> &lt; <tt class="arg">btw</tt>, it means the volume got full during the write operation. The function can take a time when the volume is full or close to full.</p>\r
 </div>\r
 \r
 \r
@@ -64,6 +64,12 @@ FRESULT f_write (
 </div>\r
 \r
 \r
+<div class="para use">\r
+<h4>Example</h4>\r
+<p>Refer to the example in <tt>f_open</tt>.</p>\r
+</div>\r
+\r
+\r
 <div class="para ref">\r
 <h4>See Also</h4>\r
 <p><tt><a href="open.html">f_open</a>, <a href="read.html">f_read</a>, <a href="putc.html">fputc</a>, <a href="puts.html">fputs</a>, <a href="printf.html">fprintf</a>, <a href="close.html">f_close</a>, <a href="sfile.html">FIL</a></tt></p>\r