void* <spanclass="arg">buff</span>, <spanclass="c">/* [OUT] Buffer to store read data */</span>
UINT <spanclass="arg">btr</span>, <spanclass="c">/* [IN] Number of bytes to read */</span>
UINT* <spanclass="arg">br</span><spanclass="c">/* [OUT] Number of bytes read */</span>
);
</pre>
</div>
<divclass="para arg">
<h4>Parameters</h4>
<dlclass="par">
<dt>fp</dt>
<dd>Pointer to the open file object.</dd>
<dt>buff</dt>
<dd>Pointer to the buffer to store read data.</dd>
<dt>btr</dt>
<dd>Number of bytes to read in range of <tt>UINT</tt> type.</dd>
<dt>br</dt>
<dd>Pointer to the <tt>UINT</tt> variable to return number of bytes read. The value is always valid after the function call regardless of the result.</dd>
</dl>
</div>
<divclass="para ret">
<h4>Return Values</h4>
<p>
<ahref="rc.html#ok">FR_OK</a>,
<ahref="rc.html#de">FR_DISK_ERR</a>,
<ahref="rc.html#ie">FR_INT_ERR</a>,
<ahref="rc.html#nr">FR_NOT_READY</a>,
<ahref="rc.html#io">FR_INVALID_OBJECT</a>,
<ahref="rc.html#tm">FR_TIMEOUT</a>
</p>
</div>
<divclass="para desc">
<h4>Description</h4>
<p>The file read/write pointer of the file object advances number of bytes read. After the function succeeded, <ttclass="arg">*br</tt> should be checked to detect end of the file. In case of <ttclass="arg">*br</tt> is less than <ttclass="arg">btr</tt>, it means the read/write pointer reached end of the file during read operation.</p>