The pf_read function reads data from the file.
FRESULT pf_read ( void* Buffer, /* [OUT] Pointer to the read buffer */ WORD ByteToRead, /* [IN] Number of bytes to read */ WORD* BytesRead /* [OUT] Pointer to the variable to return number of bytes read */ );
The read pointer in the file system object increases in number of bytes read. After the function succeeded, *BytesRead should be checked to detect end of file. In case of *BytesRead < ByteToRead, it means the read pointer reached end of file during read operation.
If a NULL is given to the Buffer, the read bytes will be forwarded to the outgoing stream instead of the memory. The streaming function will be typically built-in the low level disk read function.
Available when _USE_READ == 1.