Change the mem communication function. Now is xinda's fast read, not be tested may have some errors

Dependents:   BlackBoard_Firmware_Fast_read_not_test

Fork of Memory by Sonder Design Team

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Memory.h Source File

Memory.h

00001 #ifndef _MEMORY_H
00002 #define _MEMORY_H
00003  
00004 #include "mbed.h"
00005 
00006 #define dummy 1              //Set up a dummy byte to send to memory
00007 #define bufferSize 256      //The maximmum siz of data in the buffer, 256?
00008 
00009 
00010  
00011 class Memory {
00012 public:
00013     Memory(PinName cs_mem);
00014     
00015     short bitDouble(int in);
00016     int readData(short value [], int Address, int length);
00017     void sectorErase(long Address);
00018     int blockErase(int Address);
00019     int writeData(char buffer[], int address, int length);
00020   
00021 
00022 private:
00023     DigitalOut _cs_mem;
00024     };
00025     
00026 #endif