File | Called from | Code enabled by |
---|---|---|
| Application; | N/A |
Read from a file.
See fs_fread()
for more information.
Arguments
p_file
Pointer to a file.
p_dest
Pointer to destination buffer.
size
Number of octets to read.
p_err
Pointer to variable that will the receive return error code from the function:
FS_ERR_NONE
File read successfully.
FS_ERR_EOF
End-of-file reached.
FS_ERR_NULL_PTR
Argument p_file
/p_dest
passed a NULL pointer.
FS_ERR_INVALID_TYPE
Argument p_file
's type is invalid or unknown.
FS_ERR_FILE_NOT_OPEN
File not open.
FS_ERR_FILE_INVALID_OP
Invalid operation on file.
FS_ERR_DEV
Device access error.
Returned Value
The number of bytes read, if file read successful.
0, otherwise.
Notes/Warnings
None.