flash attribure
This commit is contained in:
@@ -183,10 +183,12 @@ struct lfs_config {
|
||||
#ifdef LFS_THREADSAFE
|
||||
// Lock the underlying block device. Negative error codes
|
||||
// are propagated to the user.
|
||||
LFS_FPTRGROUP("lfs_cfg_lock_fptr_grp")
|
||||
int (*lock)(const struct lfs_config *c);
|
||||
|
||||
// Unlock the underlying block device. Negative error codes
|
||||
// are propagated to the user.
|
||||
LFS_FPTRGROUP("lfs_cfg_unlock_fptr_grp")
|
||||
int (*unlock)(const struct lfs_config *c);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -63,6 +63,13 @@ extern "C"
|
||||
#endif
|
||||
|
||||
|
||||
// xCORE fptrgroup attribute for stack analysis
|
||||
#ifdef __xcore__
|
||||
#define LFS_FPTRGROUP(name) __attribute__((fptrgroup(name)))
|
||||
#else
|
||||
#define LFS_FPTRGROUP(name)
|
||||
#endif
|
||||
|
||||
// Macros, may be replaced by system specific wrappers. Arguments to these
|
||||
// macros must not have side-effects as the macros can be removed for a smaller
|
||||
// code footprint
|
||||
|
||||
@@ -593,6 +593,7 @@ static void lfs_fs_prepsuperblock(lfs_t *lfs, bool needssuperblock);
|
||||
|
||||
#ifdef LFS_MIGRATE
|
||||
static int lfs1_traverse(lfs_t *lfs,
|
||||
LFS_FPTRGROUP("lfs_traverse_cb_fptr_grp")
|
||||
int (*cb)(void*, lfs_block_t), void *data);
|
||||
#endif
|
||||
|
||||
@@ -5555,7 +5556,9 @@ static int lfs1_dir_next(lfs_t *lfs, lfs1_dir_t *dir, lfs1_entry_t *entry) {
|
||||
}
|
||||
|
||||
/// littlefs v1 specific operations ///
|
||||
int lfs1_traverse(lfs_t *lfs, int (*cb)(void*, lfs_block_t), void *data) {
|
||||
int lfs1_traverse(lfs_t *lfs,
|
||||
LFS_FPTRGROUP("lfs_traverse_cb_fptr_grp")
|
||||
int (*cb)(void*, lfs_block_t), void *data) {
|
||||
if (lfs_pair_isnull(lfs->lfs1->root)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user