* This is a generic implementation of seek function, you should redefine
* it in your local module.
*/
-int32_t kfile_seek(struct _KFile *fd, kfile_off_t offset, KSeekMode whence)
+kfile_off_t kfile_seek(struct _KFile *fd, kfile_off_t offset, KSeekMode whence)
{
uint32_t seek_pos;
* on \p fd handler. If you want not overwrite exist data
* you should pass an \p save_buf where test store exist data,
* otherwise su must pass NULL.
- *
- * \note some device (like flash memeory) not allow write on
- * existing data, and so this test use ASSERT macro to warn you if
- * you are writing on same fd.seek_pos.
- *
*/
bool kfile_test(uint8_t *test_buf, size_t _size , uint8_t *save_buf, size_t save_buf_size)
{
typedef size_t (*ReadFunc_t) (struct _KFile *fd, void *buf, size_t size);
typedef size_t (*WriteFunc_t) (struct _KFile *fd, const void *buf, size_t size);
-typedef int32_t (*SeekFunc_t) (struct _KFile *fd, kfile_off_t offset, KSeekMode whence);
+typedef kfile_off_t (*SeekFunc_t) (struct _KFile *fd, kfile_off_t offset, KSeekMode whence);
typedef bool (*OpenFunc_t) (struct _KFile *fd, const char *name, int mode);
typedef bool (*CloseFunc_t) (struct _KFile *fd);
/*
* Generic implementation of seek function.
*/
-int32_t kfile_seek(struct _KFile *fd, kfile_off_t offset, KSeekMode whence);
+kfile_off_t kfile_seek(struct _KFile *fd, kfile_off_t offset, KSeekMode whence);
/*
* Kfile test function