<< Previous | Next >> | |
|
int fat_Tell( FATfile *file, unsigned long *pos );
Description
- Puts the value of the position pointer (that is, the number of bytes from the beginning of the file) into
pos
. Zero indicates the position pointer is at the beginning of the file.µC/OS-II USERS:
The FAT API is not reentrant. To use the FAT from multiple µC/OS-II tasks, put the following statement in your application:
#define FAT_USE_UCOS_MUTEXMutex timeouts or other mutex errors will cause the run-time error
ERR_FAT_MUTEX_ERROR
. The default mutex timeout is 5 seconds and can be changed by #define'ing a different value forFAT_MUTEX_TIMEOUT_SEC
.You MUST call
fat_InitUCOSMutex()
after callingOSInit()
and before calling any other FAT API functions.You must not call low-level, non-API FAT or write-back cache functions. Only call FAT functions appended with "
fat_
" and with public function descriptions.Parameters
- file
- Pointer to the file structure of the open file
- pos
- Pointer to the variable where the value of the file position pointer is to be placed.
Return Value
0
: success.
-EIO
: position is beyond EOF.
-EINVAL
:file
is invalid.Library
- FAT.LIB
See Also
- fat_Seek, fat_Read, fat_Write, fat_xWrite
Dynamic C Functions | << Previous | Next >> | rabbit.com |