fs: nffs: Add NFFS filesystem support

This patch adds filesystem interface implementation for NFFS.
Default configuration for mem slabs sizes are the same as in Mynewt.

Origin: Original
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This commit is contained in:
Andrzej Kaczmarek 2017-08-08 15:12:55 +02:00 committed by Anas Nashif
commit 81da3ca295
5 changed files with 620 additions and 1 deletions

View file

@ -43,6 +43,8 @@ extern "C" {
#ifdef CONFIG_FILE_SYSTEM_FAT
#include <fs/fat_fs.h>
#elif CONFIG_FILE_SYSTEM_NFFS
#include <fs/nffs_fs.h>
#endif
#ifdef __cplusplus

26
include/fs/nffs_fs.h Normal file
View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2017 Codecoup
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _NFFS_FS_H_
#define _NFFS_FS_H_
#include <sys/types.h>
#include <nffs/nffs.h>
#ifdef __cplusplus
extern "C" {
#endif
FS_FILE_DEFINE(struct nffs_file *fp);
FS_DIR_DEFINE(struct nffs_dir *dp);
#define MAX_FILE_NAME 256
#ifdef __cplusplus
}
#endif
#endif /* _NFFS_FS_H_ */