diff --git a/libraries/nffs/examples/ListFiles/ListFiles.ino b/libraries/nffs/examples/ListFiles/ListFiles.ino index 6bb8d8aa..0e2e14b1 100644 --- a/libraries/nffs/examples/ListFiles/ListFiles.ino +++ b/libraries/nffs/examples/ListFiles/ListFiles.ino @@ -12,7 +12,6 @@ any redistribution *********************************************************************/ -#include #include /* This example print out NFFS content up to diff --git a/libraries/nffs/src/fs/nffs/src/nffs.c b/libraries/nffs/src/fs/nffs/src/nffs.c index 5ef9aa58..70f4bfbc 100644 --- a/libraries/nffs/src/fs/nffs/src/nffs.c +++ b/libraries/nffs/src/fs/nffs/src/nffs.c @@ -117,28 +117,30 @@ static const struct fs_ops nffs_ops = { .f_name = "nffs" }; -//STATS_SECT_DECL(nffs_stats) nffs_stats; -//STATS_NAME_START(nffs_stats) -// STATS_NAME(nffs_stats, nffs_hashcnt_ins) -// STATS_NAME(nffs_stats, nffs_hashcnt_rm) -// STATS_NAME(nffs_stats, nffs_object_count) -// STATS_NAME(nffs_stats, nffs_iocnt_read) -// STATS_NAME(nffs_stats, nffs_iocnt_write) -// STATS_NAME(nffs_stats, nffs_gccnt) -// STATS_NAME(nffs_stats, nffs_readcnt_data) -// STATS_NAME(nffs_stats, nffs_readcnt_block)36 -// STATS_NAME(nffs_stats, nffs_readcnt_crc) -// STATS_NAME(nffs_stats, nffs_readcnt_copy) -// STATS_NAME(nffs_stats, nffs_readcnt_format) -// STATS_NAME(nffs_stats, nffs_readcnt_gccollate) -// STATS_NAME(nffs_stats, nffs_readcnt_inode) -// STATS_NAME(nffs_stats, nffs_readcnt_inodeent) -// STATS_NAME(nffs_stats, nffs_readcnt_rename) -// STATS_NAME(nffs_stats, nffs_readcnt_update) -// STATS_NAME(nffs_stats, nffs_readcnt_filename) -// STATS_NAME(nffs_stats, nffs_readcnt_object) -// STATS_NAME(nffs_stats, nffs_readcnt_detect) -//STATS_NAME_END(nffs_stats) +#if 0 +STATS_SECT_DECL(nffs_stats) nffs_stats; +STATS_NAME_START(nffs_stats) + STATS_NAME(nffs_stats, nffs_hashcnt_ins) + STATS_NAME(nffs_stats, nffs_hashcnt_rm) + STATS_NAME(nffs_stats, nffs_object_count) + STATS_NAME(nffs_stats, nffs_iocnt_read) + STATS_NAME(nffs_stats, nffs_iocnt_write) + STATS_NAME(nffs_stats, nffs_gccnt) + STATS_NAME(nffs_stats, nffs_readcnt_data) + STATS_NAME(nffs_stats, nffs_readcnt_block) + STATS_NAME(nffs_stats, nffs_readcnt_crc) + STATS_NAME(nffs_stats, nffs_readcnt_copy) + STATS_NAME(nffs_stats, nffs_readcnt_format) + STATS_NAME(nffs_stats, nffs_readcnt_gccollate) + STATS_NAME(nffs_stats, nffs_readcnt_inode) + STATS_NAME(nffs_stats, nffs_readcnt_inodeent) + STATS_NAME(nffs_stats, nffs_readcnt_rename) + STATS_NAME(nffs_stats, nffs_readcnt_update) + STATS_NAME(nffs_stats, nffs_readcnt_filename) + STATS_NAME(nffs_stats, nffs_readcnt_object) + STATS_NAME(nffs_stats, nffs_readcnt_detect) +STATS_NAME_END(nffs_stats) +#endif static void nffs_lock(void) @@ -162,11 +164,13 @@ static int nffs_stats_init(void) { int rc = 0; -// rc = stats_init_and_reg( -// STATS_HDR(nffs_stats), -// STATS_SIZE_INIT_PARMS(nffs_stats, STATS_SIZE_32), -// STATS_NAME_INIT_PARMS(nffs_stats), -// "nffs_stats"); +#if 0 + rc = stats_init_and_reg( + STATS_HDR(nffs_stats), + STATS_SIZE_INIT_PARMS(nffs_stats, STATS_SIZE_32), + STATS_NAME_INIT_PARMS(nffs_stats), + "nffs_stats"); +#endif if (rc) { if (rc < 0) { /* multiple initializations are okay */ diff --git a/libraries/nffs/src/kernel/os/include/os/os_mutex.h b/libraries/nffs/src/kernel/os/include/os/os_mutex.h index 75108013..ea3d9b8b 100644 --- a/libraries/nffs/src/kernel/os/include/os/os_mutex.h +++ b/libraries/nffs/src/kernel/os/include/os/os_mutex.h @@ -22,21 +22,22 @@ #include "os/os.h" //#include "os/queue.h" - #include "rtos.h" #ifdef __cplusplus extern "C" { #endif -//struct os_mutex -//{ -// SLIST_HEAD(, os_task) mu_head; /* chain of waiting tasks */ -// uint8_t _pad; -// uint8_t mu_prio; /* owner's default priority*/ -// uint16_t mu_level; /* call nesting level */ -// struct os_task *mu_owner; /* owners task */ -//}; +#if 0 +struct os_mutex +{ + SLIST_HEAD(, os_task) mu_head; /* chain of waiting tasks */ + uint8_t _pad; + uint8_t mu_prio; /* owner's default priority*/ + uint16_t mu_level; /* call nesting level */ + struct os_task *mu_owner; /* owners task */ +}; +#endif /* XXX: NOTES diff --git a/libraries/nffs/src/sys/flash_map/include/flash_map/flash_map.h b/libraries/nffs/src/sys/flash_map/include/flash_map/flash_map.h index cdcee32e..acb0f29b 100644 --- a/libraries/nffs/src/sys/flash_map/include/flash_map/flash_map.h +++ b/libraries/nffs/src/sys/flash_map/include/flash_map/flash_map.h @@ -64,7 +64,7 @@ void flash_map_init(void); /* * Start using flash area. */ -static int flash_area_open(uint8_t id, const struct flash_area **); +int flash_area_open(uint8_t id, const struct flash_area **); void flash_area_close(const struct flash_area *);