This commit is contained in:
hathach committed 2017-03-01 14:53:14 +07:00
1 parent 1abc60fc1b
commit 40d3d89236
4 files changed
+42 -38

No files matched your search

@@ -12,7 +12,6 @@
any redistribution
*********************************************************************/
#include <bluefruit.h>
#include <NewtNffs.h>
/* This example print out NFFS content up to
+31 -27
View File
@@ -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 */
@@ -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
@@ -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 *);