mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-11-16 04:24:35 +00:00
Added API boilerplate for lfs_fs_findfreeblocks and consistent style
This adds the tracing and optional locking for the littlefs API. Also updated to match the code style, and added LFS_READONLY guards where necessary.
This commit is contained in:
9
lfs.h
9
lfs.h
@@ -712,9 +712,12 @@ lfs_ssize_t lfs_fs_size(lfs_t *lfs);
|
||||
// Returns a negative error code on failure.
|
||||
int lfs_fs_traverse(lfs_t *lfs, int (*cb)(void*, lfs_block_t), void *data);
|
||||
|
||||
// Use Traverse function and try to find free blocks. LittleFS free blocks search is unpredictable.
|
||||
// Search is costly operation which may delay write. In realtime write scenarios can be better to find them before a write.
|
||||
int lfs_find_free_blocks(lfs_t *lfs);
|
||||
// Use Traverse function and try to find free blocks. LittleFS free blocks
|
||||
// search is unpredictable.
|
||||
//
|
||||
// Search is costly operation which may delay write. In realtime write
|
||||
// scenarios can be better to find them before a write.
|
||||
int lfs_fs_findfreeblocks(lfs_t *lfs);
|
||||
|
||||
#ifndef LFS_READONLY
|
||||
// Attempt to make the filesystem consistent and ready for writing
|
||||
|
||||
Reference in New Issue
Block a user