Run a filesystem on the Dragonfly's SPI flash.

Dependencies:   SpiFlash25 flash-fs mbed

Fork of flash-fs-example by MultiTech

Files at this revision

API Documentation at this revision

Comitter:
mfiore
Date:
Fri Feb 26 16:53:58 2016 +0000
Parent:
5:c0f6a3babedf
Commit message:
Updated mbed library to revision 112, disable regulator's battery charger

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r c0f6a3babedf -r 11c09ef31db4 main.cpp
--- a/main.cpp	Wed Sep 30 16:26:28 2015 +0000
+++ b/main.cpp	Fri Feb 26 16:53:58 2016 +0000
@@ -8,6 +8,11 @@
 #include "spiffs.h"
 #include <string>
 
+// This line controls the regulator's battery charger.
+// BC_NCE = 0 enables the battery charger
+// BC_NCE = 1 disables the battery charger
+DigitalOut bc_nce(PB_2);
+
 // this value represents the number of files you can have open at the same time
 // adjust it according to your requirements
 #define MAX_CONCURRENT_FDS      4
@@ -41,6 +46,9 @@
 }
 
 int main(void) {
+    // Disable the battery charger unless a battery is attached.
+    bc_nce = 1;
+    
     int ret;
     int handle;
     char data[256];
diff -r c0f6a3babedf -r 11c09ef31db4 mbed.bld
--- a/mbed.bld	Wed Sep 30 16:26:28 2015 +0000
+++ b/mbed.bld	Fri Feb 26 16:53:58 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96
\ No newline at end of file