Using SPI flash with STM32F407VET6 board.

Dependencies:   SpiFlash25 flash-fs mbed

Fork of Dragonfly_Filesystem_Example by MultiTech

Using the on-board Winbond W25Q16 16Mbit SPI Flash memory chip with STM32F407VET6 black boards

Revision:
6:11c09ef31db4
Parent:
5:c0f6a3babedf
Child:
7:afdf19fe2341
--- 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];