This function is used to move the read/write pointer within a file.
Syntax |
i32 f_seek (i32 offset, i32 mode, stru_filehnd stru) |
||||||||
---|---|---|---|---|---|---|---|---|---|
offset |
Defines the position of the pointer within the file. The value provided by offset is interpreted by the operating system appropriately, depending on the specified mode parameter |
||||||||
mode |
Is a constant that specifies how the offset parameter value is interpreted. Allowed values are as follows:
|
||||||||
stru |
Variable of type stru_filehnd that contains the handle obtained via the f_open() function |
||||||||
Result |
Returns 1 if the operation resulted in success |
||||||||
Validity |
Task |
||||||||
Note |
If functions regarding compact flash management are used, it is recommended that bit 14 of the sys_cfg variable (0x00004000) be imposed to 1 to enable the use of safety routines for flash write/read |
Example of use:
|