rename NewtNffs to ApacheNffs
This commit is contained in:
1 parent
8d80b01f84
commit
100ba3af0f
10 files changed
+30
-30
No files matched your search
@@ -13,7 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <bluefruit.h>
|
||||
#include <NewtNffs.h>
|
||||
#include <ApacheNffs.h>
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
/**************************************************************************/
|
||||
|
||||
#include "bluefruit.h"
|
||||
#include <NewtNffs.h>
|
||||
#include <ApacheNffs.h>
|
||||
|
||||
// Note chaning these parameters will affect APP_RAM_BASE
|
||||
// --> need to update RAM in feather52_s132.ld linker
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <bluefruit.h>
|
||||
#include <NewtNffs.h>
|
||||
#include <ApacheNffs.h>
|
||||
|
||||
/* This example print out NFFS content up to
|
||||
* MAX_LEVEL level of directories (including root)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <bluefruit.h>
|
||||
#include <NewtNffs.h>
|
||||
#include <ApacheNffs.h>
|
||||
|
||||
#define FILENAME "/adafruit.txt"
|
||||
#define CONTENTS "Bluefruit Feather52's NFFS file contents"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
name=Newt Newtron Flash Filesystem
|
||||
name=Newtron Flash Filesystem
|
||||
version=0.1.0
|
||||
author=Adafruit
|
||||
author=Apache Software Foundation
|
||||
maintainer=Adafruit <info@adafruit.com>
|
||||
sentence=Newt Newtron Flash Filesystem
|
||||
paragraph=Newt Newtron Flash Filesystem
|
||||
sentence=Newtron Flash Filesystem
|
||||
paragraph=Newtron Flash Filesystem
|
||||
category=Communication
|
||||
url=https://github.com/adafruit/Adafruit_nRF52_Arduino
|
||||
architectures=*
|
||||
|
||||
@@ -34,22 +34,22 @@
|
||||
*/
|
||||
/**************************************************************************/
|
||||
|
||||
#include "NewtNffs.h"
|
||||
#include "ApacheNffs.h"
|
||||
|
||||
#include "syscfg/syscfg.h"
|
||||
#include "hal/hal_flash.h"
|
||||
|
||||
#define NFFS_AREA_MAX 8
|
||||
|
||||
NewtNffs Nffs;
|
||||
ApacheNffs Nffs;
|
||||
|
||||
NewtNffs::NewtNffs(void)
|
||||
ApacheNffs::ApacheNffs(void)
|
||||
{
|
||||
errnum = FS_EOK;
|
||||
_initialized = false;
|
||||
}
|
||||
|
||||
bool NewtNffs::begin(void)
|
||||
bool ApacheNffs::begin(void)
|
||||
{
|
||||
// Follow code in nffs_pkg_init()
|
||||
if (_initialized) return true;
|
||||
@@ -85,7 +85,7 @@ bool NewtNffs::begin(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NewtNffs::format(void)
|
||||
bool ApacheNffs::format(void)
|
||||
{
|
||||
struct nffs_area_desc descs[NFFS_AREA_MAX + 1];
|
||||
int cnt = NFFS_AREA_MAX;
|
||||
@@ -99,7 +99,7 @@ bool NewtNffs::format(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NewtNffs::mkdir(const char* path)
|
||||
bool ApacheNffs::mkdir(const char* path)
|
||||
{
|
||||
errnum = fs_mkdir(path);
|
||||
return (errnum == FS_EOK);
|
||||
@@ -110,7 +110,7 @@ bool NewtNffs::mkdir(const char* path)
|
||||
* @param path Absolute path of directory, must start with '/'
|
||||
* @return
|
||||
*/
|
||||
bool NewtNffs::mkdir_p(const char* path)
|
||||
bool ApacheNffs::mkdir_p(const char* path)
|
||||
{
|
||||
char* parent = (char*) rtos_malloc(strlen(path)+1);
|
||||
const char* slash = path+1; // skip root '/'
|
||||
@@ -133,19 +133,19 @@ bool NewtNffs::mkdir_p(const char* path)
|
||||
return (errnum == FS_EOK);
|
||||
}
|
||||
|
||||
bool NewtNffs::remove(const char* path)
|
||||
bool ApacheNffs::remove(const char* path)
|
||||
{
|
||||
errnum = fs_unlink(path);
|
||||
return (errnum == FS_EOK);
|
||||
}
|
||||
|
||||
bool NewtNffs::rename(const char* from, const char* to)
|
||||
bool ApacheNffs::rename(const char* from, const char* to)
|
||||
{
|
||||
errnum = fs_rename(from, to);
|
||||
return (errnum == FS_EOK);
|
||||
}
|
||||
|
||||
uint32_t NewtNffs::readFile (const char* filename, void* buffer, uint32_t bufsize, int32_t offset)
|
||||
uint32_t ApacheNffs::readFile (const char* filename, void* buffer, uint32_t bufsize, int32_t offset)
|
||||
{
|
||||
NffsFile f(filename, FS_ACCESS_READ);
|
||||
|
||||
@@ -164,7 +164,7 @@ uint32_t NewtNffs::readFile (const char* filename, void* buffer, uint32_t bufsiz
|
||||
return count;
|
||||
}
|
||||
|
||||
bool NewtNffs::writeFile(const char* filename, const void* data, uint32_t count, int32_t offset)
|
||||
bool ApacheNffs::writeFile(const char* filename, const void* data, uint32_t count, int32_t offset)
|
||||
{
|
||||
NffsFile f(filename, FS_ACCESS_WRITE);
|
||||
|
||||
@@ -182,7 +182,7 @@ bool NewtNffs::writeFile(const char* filename, const void* data, uint32_t count,
|
||||
return result;
|
||||
}
|
||||
|
||||
bool NewtNffs::testFile (const char* filename)
|
||||
bool ApacheNffs::testFile (const char* filename)
|
||||
{
|
||||
NffsFile f(filename, FS_ACCESS_READ);
|
||||
bool result = f.exists();
|
||||
@@ -191,7 +191,7 @@ bool NewtNffs::testFile (const char* filename)
|
||||
return result;
|
||||
}
|
||||
|
||||
bool NewtNffs::testFolder(const char* path)
|
||||
bool ApacheNffs::testFolder(const char* path)
|
||||
{
|
||||
NffsDir f(path);
|
||||
bool result = f.exists();
|
||||
@@ -33,8 +33,8 @@
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/**************************************************************************/
|
||||
#ifndef NEWTNFFS_H_
|
||||
#define NEWTNFFS_H_
|
||||
#ifndef APACHENFFS_H_
|
||||
#define APACHENFFS_H_
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "NffsFile.h"
|
||||
#include "NffsDir.h"
|
||||
|
||||
class NewtNffs
|
||||
class ApacheNffs
|
||||
{
|
||||
private:
|
||||
bool _initialized;
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
public:
|
||||
int errnum;
|
||||
|
||||
NewtNffs(void);
|
||||
ApacheNffs(void);
|
||||
|
||||
bool begin(void);
|
||||
|
||||
@@ -87,6 +87,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
extern NewtNffs Nffs;
|
||||
extern ApacheNffs Nffs;
|
||||
|
||||
#endif /* NEWTNFFS_H_ */
|
||||
#endif /* APACHENFFS_H_ */
|
||||
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
/**************************************************************************/
|
||||
|
||||
#include "NewtNffs.h"
|
||||
#include "ApacheNffs.h"
|
||||
|
||||
void NffsDir::_init(void)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
/**************************************************************************/
|
||||
|
||||
#include "NewtNffs.h"
|
||||
#include "ApacheNffs.h"
|
||||
|
||||
NffsDirEntry::NffsDirEntry(void)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
/**************************************************************************/
|
||||
|
||||
#include "NewtNffs.h"
|
||||
#include "ApacheNffs.h"
|
||||
|
||||
void NffsFile::_init(void)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user