add file seek

This commit is contained in:
hathach committed 2018-10-17 13:29:53 +07:00
1 parent 5c9fa09a93
commit aa5b285b26
4 files changed
+10 -1

No files matched your search

+5
View File
@@ -248,6 +248,11 @@ int LittleFS::_f_read (void* fhdl, void *buf, uint16_t nbyte)
return lfs_file_read(&_lfs, (lfs_file_t*) fhdl, buf, nbyte);
}
bool LittleFS::_f_seek (void* fhdl, uint32_t pos)
{
return lfs_file_seek(&_lfs, (lfs_file_t*) fhdl, pos, LFS_SEEK_SET) >= 0;
}
void LittleFS::_f_close (void* fhdl)
{
lfs_file_close(&_lfs, (lfs_file_t*) fhdl);