fix #276 rename macro FILE_READ/WRITE to enum FILE_O_READ/WRITE
to avoid conflict with other filesystem define
This commit is contained in:
1 parent
9b37e28bc2
commit
b99cae32b6
8 files changed
+33
-26
No files matched your search
@@ -70,7 +70,7 @@ void loop()
|
||||
void printTreeDir(const char* cwd, uint8_t level)
|
||||
{
|
||||
// Open the input folder
|
||||
File dir(cwd, FILE_READ, InternalFS);
|
||||
File dir(cwd, FILE_O_READ, InternalFS);
|
||||
|
||||
// Print root
|
||||
if (level == 0) Serial.println("root");
|
||||
@@ -79,7 +79,7 @@ void printTreeDir(const char* cwd, uint8_t level)
|
||||
File item(InternalFS);
|
||||
|
||||
// Loop through the directory
|
||||
while( (item = dir.openNextFile(FILE_READ)) )
|
||||
while( (item = dir.openNextFile(FILE_O_READ)) )
|
||||
{
|
||||
// Indentation according to dir level
|
||||
for(int i=0; i<level; i++) Serial.print("| ");
|
||||
|
||||
@@ -44,7 +44,7 @@ void setup()
|
||||
// Initialize Internal File System
|
||||
InternalFS.begin();
|
||||
|
||||
file.open(FILENAME, FILE_READ);
|
||||
file.open(FILENAME, FILE_O_READ);
|
||||
|
||||
// file existed
|
||||
if ( file )
|
||||
@@ -62,7 +62,7 @@ void setup()
|
||||
{
|
||||
Serial.print("Open " FILENAME " file to write ... ");
|
||||
|
||||
if( file.open(FILENAME, FILE_WRITE) )
|
||||
if( file.open(FILENAME, FILE_O_WRITE) )
|
||||
{
|
||||
Serial.println("OK");
|
||||
file.write(CONTENTS, strlen(CONTENTS));
|
||||
|
||||
Reference in new issue
Block a user