diff --git a/libraries/Adafruit_LittleFS/examples/LFS_Format/LFS_Format.ino b/libraries/Adafruit_LittleFS/examples/LFS_Format/LFS_Format.ino deleted file mode 100644 index 91870219..00000000 --- a/libraries/Adafruit_LittleFS/examples/LFS_Format/LFS_Format.ino +++ /dev/null @@ -1,52 +0,0 @@ -/********************************************************************* - This is an example for our nRF52 based Bluefruit LE modules - - Pick one up today in the adafruit shop! - - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - MIT license, check LICENSE for more information - All text above, and the splash screen below must be included in - any redistribution -*********************************************************************/ - -#include -#include - -using namespace Adafruit_LittleFS_Namespace; - -// the setup function runs once when you press reset or power the board -void setup() -{ - Serial.begin(115200); - while ( !Serial ) delay(10); // for nrf52840 with native usb - - Serial.println("InternalFS Format Example"); - Serial.println(); - - // Wait for user input to run. - Serial.println("This sketch will destroy all of your data in External Flash!"); - Serial.print("Enter any keys to continue:"); - while ( !Serial.available() ) delay(1); - Serial.println(); - Serial.println(); - - // Initialize Internal File System - InternalFS.begin(); - - Serial.print("Formating ... "); - delay(1); // for message appear on monitor - - // Format - InternalFS.format(); - - Serial.println("Done"); -} - -// the loop function runs over and over again forever -void loop() -{ - // nothing to do -} diff --git a/libraries/Adafruit_LittleFS/examples/LFS_ListFiles/LFS_ListFiles.ino b/libraries/Adafruit_LittleFS/examples/LFS_ListFiles/LFS_ListFiles.ino deleted file mode 100644 index 54101be8..00000000 --- a/libraries/Adafruit_LittleFS/examples/LFS_ListFiles/LFS_ListFiles.ino +++ /dev/null @@ -1,124 +0,0 @@ -/********************************************************************* - This is an example for our nRF52 based Bluefruit LE modules - - Pick one up today in the adafruit shop! - - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - MIT license, check LICENSE for more information - All text above, and the splash screen below must be included in - any redistribution -*********************************************************************/ - -#include -#include - -using namespace Adafruit_LittleFS_Namespace; - -/* This example print out Internal Flash contents up to - * MAX_LEVEL level of directories (including root) - * WARNING: This example uses recursive call to print out directory tree - * be extra careful, high number of MAX_LEVEL can cause memory overflow - */ -#define MAX_LEVEL 2 - -// the setup function runs once when you press reset or power the board -void setup() -{ - Serial.begin(115200); - while ( !Serial ) delay(10); // for nrf52840 with native usb - - Serial.println("InternalFS List Files Example"); - - // Initialize Internal File System - InternalFS.begin(); - - // Print whole directory tree of root whose level is 0 - printTreeDir("/", 0); - - // Print prompt - Serial.println(); - Serial.println("Enter anything to print directory tree:"); -} - -// the loop function runs over and over again forever -void loop() -{ - if ( Serial.available() ) - { - delay(10); // delay for all input arrived - while( Serial.available() ) Serial.read(); - - printTreeDir("/", 0); - - // Print prompt - Serial.println(); - Serial.println("Enter anything to print directory tree:"); - } -} - -/**************************************************************************/ -/*! - @brief Print out whole directory tree of an folder - until the level reach MAX_LEVEL - - @note Recursive call -*/ -/**************************************************************************/ -void printTreeDir(const char* cwd, uint8_t level) -{ - // Open the input folder - File dir(cwd, FILE_READ, InternalFS); - - // Print root - if (level == 0) Serial.println("root"); - - // File within folder - File item(InternalFS); - - // Loop through the directory - while( (item = dir.openNextFile(FILE_READ)) ) - { - // Indentation according to dir level - for(int i=0; i 50 - Serial.print(' '); - - Serial.print( item.size() ); - Serial.println( " Bytes"); - } - - item.close(); - } - - dir.close(); -} diff --git a/libraries/Adafruit_LittleFS/examples/LFS_ReadWrite/LFS_ReadWrite.ino b/libraries/Adafruit_LittleFS/examples/LFS_ReadWrite/LFS_ReadWrite.ino deleted file mode 100644 index c7adaf13..00000000 --- a/libraries/Adafruit_LittleFS/examples/LFS_ReadWrite/LFS_ReadWrite.ino +++ /dev/null @@ -1,82 +0,0 @@ -/********************************************************************* - This is an example for our nRF52 based Bluefruit LE modules - - Pick one up today in the adafruit shop! - - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing - products from Adafruit! - - MIT license, check LICENSE for more information - All text above, and the splash screen below must be included in - any redistribution -*********************************************************************/ - -#include -#include - -using namespace Adafruit_LittleFS_Namespace; - -#define FILENAME "/adafruit.txt" -#define CONTENTS "Adafruit Little File System test file contents" - -File file(InternalFS); - -// the setup function runs once when you press reset or power the board -void setup() -{ - Serial.begin(115200); - while ( !Serial ) delay(10); // for nrf52840 with native usb - - Serial.println("Internal Read Write File Example"); - Serial.println(); - - // Wait for user input to run. Otherwise the code will - // always run immediately after flash and create the FILENAME in advance - Serial.print("Enter to any keys to continue:"); - while ( !Serial.available() ) - { - delay(1); - } - Serial.println(); - Serial.println(); - - // Initialize Internal File System - InternalFS.begin(); - - file.open(FILENAME, FILE_READ); - - // file existed - if ( file ) - { - Serial.println(FILENAME " file exists"); - - uint32_t readlen; - char buffer[64] = { 0 }; - readlen = file.read(buffer, sizeof(buffer)); - - buffer[readlen] = 0; - Serial.println(buffer); - file.close(); - }else - { - Serial.print("Open " FILENAME " file to write ... "); - - if( file.open(FILENAME, FILE_WRITE) ) - { - Serial.println("OK"); - file.write(CONTENTS, strlen(CONTENTS)); - file.close(); - }else - { - Serial.println("Failed!"); - } - } - - Serial.println("Done"); -} - -// the loop function runs over and over again forever -void loop() -{ -}