Modified method to get file position.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12077 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
Giovanni Di Sirio 2018-06-02 16:23:30 +00:00
parent 40081c7239
commit a3aec1cc01
1 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ typedef uint32_t fileoffset_t;
/* File get size method.*/ \
msg_t (*getsize)(void *instance); \
/* File get current position method.*/ \
msg_t (*getposition)(void *instance); \
msg_t (*getposition)(void *instance, fileoffset_t *offset); \
/* File seek method.*/ \
msg_t (*lseek)(void *instance, fileoffset_t offset);
@ -82,8 +82,7 @@ typedef uint32_t fileoffset_t;
* without implementation.
*/
#define _file_stream_data \
_base_sequential_stream_data \
fileoffset_t offset
_base_sequential_stream_data
/**
* @extends BaseSequentialStreamVMT
@ -213,12 +212,13 @@ typedef struct {
* @brief Returns the current file pointer position.
*
* @param[in] ip pointer to a @p FileStream or derived class
* @param[out] offset current position in the file
* @return The current position inside the file.
* @retval FILE_ERROR operation failed.
*
* @api
*/
#define fileStreamGetPosition(ip) ((ip)->vmt->getposition(ip))
#define fileStreamGetPosition(ip, offset) ((ip)->vmt->getposition(ip, offset))
/**
* @brief Moves the file current pointer to an absolute position.