summaryrefslogtreecommitdiff
path: root/fatfs/documents/doc/write.html
diff options
context:
space:
mode:
Diffstat (limited to 'fatfs/documents/doc/write.html')
-rw-r--r--fatfs/documents/doc/write.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/fatfs/documents/doc/write.html b/fatfs/documents/doc/write.html
index d451255..3d16674 100644
--- a/fatfs/documents/doc/write.html
+++ b/fatfs/documents/doc/write.html
@@ -32,9 +32,9 @@ FRESULT f_write (
<dt>buff</dt>
<dd>Pointer to the data to be written.</dd>
<dt>btw</dt>
-<dd>Specifies number of bytes to write in range of <tt>UINT</tt> type.</dd>
+<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>
<dt>bw</dt>
-<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>
+<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>
</dl>
</div>
@@ -54,7 +54,7 @@ FRESULT f_write (
<div class="para desc">
<h4>Description</h4>
-<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>
+<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>
</div>
@@ -64,6 +64,12 @@ FRESULT f_write (
</div>
+<div class="para use">
+<h4>Example</h4>
+<p>Refer to the example in <tt>f_open</tt>.</p>
+</div>
+
+
<div class="para ref">
<h4>See Also</h4>
<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>