Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Memory.h
- Committer:
- ThomasSonderDesign
- Date:
- 2018-04-15
- Revision:
- 8:6af25b9563df
- Parent:
- 2:5c70c0334ed0
- Child:
- 10:96b5e7dcc91f
File content as of revision 8:6af25b9563df:
#ifndef _MEMORY_H
#define _MEMORY_H
#include "mbed.h"
#define dummy 1 //Set up a dummy byte to send to memory
#define bufferSize 256 //The maximmum siz of data in the buffer, 256?
class Memory {
public:
Memory(PinName cs_mem);
short bitDouble(int in);
int readData(SPI my_spi, short value [], int Address, int length);
void sectorErase(SPI my_spi, long Address);
int blockErase(SPI my_spi, int Address);
int writeData(SPI my_spi, char buffer[], int address, int length);
private:
DigitalOut _cs_mem;
};
#endif