From 5630b9308323c3f3aaa09be8fe0f3aecaa826473 Mon Sep 17 00:00:00 2001 From: Leo C. Date: Sun, 30 Jun 2024 09:37:28 +0200 Subject: Import fatfs R0.15 --- fatfs/documents/doc/read.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'fatfs/documents/doc/read.html') diff --git a/fatfs/documents/doc/read.html b/fatfs/documents/doc/read.html index 3f0d23b..9dff623 100644 --- a/fatfs/documents/doc/read.html +++ b/fatfs/documents/doc/read.html @@ -30,11 +30,11 @@ FRESULT f_read (
fp
Pointer to the open file object.
buff
-
Pointer to the buffer to store read data.
+
Pointer to the buffer to store the read data.
btr
-
Number of bytes to read in range of UINT type.
+
Number of bytes to read in range of UINT type. If the file needs to be read fast, it should be read in large chunk as possible.
br
-
Pointer to the UINT variable to return number of bytes read. This value is always valid after the function call regardless of the function return code.
+
Pointer to the UINT variable that receives number of bytes read. This value is always valid after the function call regardless of the function return code. If the return value is equal to btr, the function return code should be FR_OK.
@@ -54,7 +54,7 @@ FRESULT f_read (

Description

-

The function starts to read data from the file at the position pointed by the read/write pointer. The read/write pointer advances as number of bytes read. After the function succeeded, *br should be checked to detect end of the file. In case of *br < btr, it means the read/write pointer reached end of the file during read operation.

+

The function starts to read data from the file at the file offset pointed by read/write pointer. The read/write pointer advances as number of bytes read. After the function succeeded, *br should be checked to detect end of the file. In case of *br < btr, it means the read/write pointer hit end of the file during read operation.

@@ -64,6 +64,12 @@ FRESULT f_read ( +
+

Example

+

Refer to the example in f_open.

+
+ +

See Also

f_open, fgets, f_write, f_close, FIL

-- cgit v1.2.3