.

Revision:
28:bc8560ba955d
Parent:
26:06d3aa3eff55
Child:
29:d28cf713107b
diff -r a1b682cc912b -r bc8560ba955d main.cpp
--- a/main.cpp	Thu Jan 17 12:30:29 2019 +0000
+++ b/main.cpp	Thu Jan 17 13:15:29 2019 +0000
@@ -19,15 +19,22 @@
 
 #include "BlockDevice.h"
 
-// File systems
-#include "LittleFileSystem.h"
-#include "FATFileSystem.h"
+// This will take the system's default block device
+BlockDevice *bd = BlockDevice::get_default_instance();
+
+// Instead of the default block device, you can define your own block device.
+// For example: HeapBlockDevice with size of 2048 bytes, read size 1, write size 1 and erase size 512.
+// #include "HeapBlockDevice.h"
+// BlockDevice *bd = new HeapBlockDevice(2048, 1, 1, 512);
 
 
-BlockDevice *bd = BlockDevice::get_default_instance();
+// This example uses LittleFileSystem as the default file system
+#include "LittleFileSystem.h"
+LittleFileSystem fs("fs");
 
-// File system declaration
-LittleFileSystem fs("fs");
+// Uncomment the following two lines and comment the previous two to use FAT file system.
+// #include "FATFileSystem.h"
+// FATFileSystem fs("fs");
 
 
 // Set up the button to trigger an erase