SPI Single IO NOR Flash Library for Nucleo F767ZI Interfacing

Dependents:   SPI_FLASH_MEM

Fork of W25X40BV by Johnny Yam

Revision:
8:9f5a31575cdd
Parent:
5:c2707c92ecb5
--- a/S25FL256S.h	Tue May 22 09:44:34 2018 +0000
+++ b/S25FL256S.h	Tue Oct 23 10:22:44 2018 +0000
@@ -6,7 +6,7 @@
 #include "mbed.h"
 #include <string>
 
-#define SPI_FREQ        5000000                 //Change SPI Frequency Here
+#define SPI_FREQ        10000000                 //Change SPI Frequency Here
 #define SPI_MODE        0                       // SPI Mode can be 0 or 3 . see data sheet
 #define SPI_NBIT        8                       // Number of bits 8.
 
@@ -120,7 +120,7 @@
     void writeByte(int addr, int data);                     // takes a 32-bit (4 bytes) address and a byte of data to write at that location
     void writeStream(int addr, char* buf, int count);       // write count bytes of data from buf to memory, starting at addr  
     void writeString(int add, string str);
-    void sectorErase(int addr);
+    int sectorErase(int addr);
     void chipErase();                                       //erase all data on chip
     uint8_t readRegister();  
     uint8_t checkIfBusy();                                  // Check if IC is bury writing or erasing