Erase SPI Flash

Dependencies:   SPI_IS25LQ032B mbed-os

Fork of ISSI_FLASH_Erase by Suraj Pal

Revision:
0:9e7d8a79a29c
diff -r 000000000000 -r 9e7d8a79a29c main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Mar 12 21:55:00 2018 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+#include "SPI_IS25LQ032B.h"
+DigitalOut led(P1_5);
+Serial uart(P1_2, P1_1);
+SPI_IS25LQ032B spi(p20, p21, p19, p17);
+main()
+{   
+    uart.baud(115200);
+    uart.printf("spif test \n");
+    
+    while(1)
+    {
+        led = !led;
+        wait(1);
+        uart.printf("SPI Status:%d \n\r", spi.readStatus());
+        spi.chipErase();
+        uart.printf("spif Erased \n\r");
+    }
+}
\ No newline at end of file