FIL* <em>FileObject</em> /* Pointer to the file object structure */
19
);
20
</pre>
21
</div>
22
23
<div class="para">
24
<h4>Parameter</h4>
25
<dl class="par">
26
<dt>FileObject</dt>
27
<dd>Pointer to the open file object structure to be closed.</dd>
28
</dl>
29
</div>
30
31
32
<div class="para">
33
<h4>Return Values</h4>
34
<dl class="ret">
35
<dt>FR_OK (0)</dt>
36
<dd>The file object has been closed successfuly.</dd>
37
<dt>FR_DISK_ERR</dt>
38
<dd>The function failed due to an error in the disk function.</dd>
39
<dt>FR_INT_ERR</dt>
40
<dd>The function failed due to a wrong FAT structure or an internal error.</dd>
41
<dt>FR_NOT_READY</dt>
42
<dd>The disk drive cannot work due to no medium in the drive or any other reason.</dd>
43
<dt>FR_INVALID_OBJECT</dt>
44
<dd>The file object is invalid.</dd>
45
</dl>
46
</div>
47
48
49
<div class="para">
50
<h4>Description</h4>
51
<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>