Sonder Design Team / Memory
Revision:
0:c2e41d203cdb
Child:
1:9d8c932d26ae
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Memory.h	Mon Apr 18 00:39:27 2016 +0000
@@ -0,0 +1,24 @@
+#ifndef _MEMORY_H
+#define _MEMORY_H
+ 
+#include "mbed.h"
+
+#define dummy 1              //Set up a dummy byte to send to memory
+#define bufferSize 3840       //The maximmum siz of data in the buffer
+
+
+ 
+class Memory {
+public:
+    Memory(PinName cs_mem);
+    int readData(SPI my_spi, char value [], int Address, int length);
+    void sectorErase(SPI my_spi, long Address);
+    void blockErase(SPI my_spi, int Address);
+    int writeData(SPI my_spi, char buffer[], int address, int length);
+  
+
+private:
+    DigitalOut _cs_mem;
+    };
+    
+#endif