Device to measure angle and get IMU measurements.

Dependencies:   mbed commands BLE_API nRF51822

Storage.h

Committer:
dkester
Date:
2015-06-07
Revision:
5:46947b447701
Parent:
4:2a5a08b14539
Child:
6:75263c93daf7

File content as of revision 5:46947b447701:

#ifndef _STORAGE_H_
#define _STORAGE_H_

#include "mbed.h"

class Storage
{
    static Storage* instance;
    Storage();

public:

    static Storage* getInstance();
    void setup();
    void setWREN();
    void setWRDI();
    int8_t getSR1();
    int8_t getSR2();
    void  clearSR();
    bool isBusy();
    void endAction();
    
    void pageProgram(int32_t addr);
    void writeData(int8_t data);
    
    void read(int32_t addr);
    int8_t readData();
    
    void bulkErase();
    void sectorErase(int32_t addr);
    void reset();

};

#endif /* _STORAGE_H_ */



/*
class Singleton
{
    private:
        int mData;

    public:
        static Singleton& getInstance()
        {
            static Singleton instance;
            return instance;
        }
        int GetData()
        {
            return mData;
        }
    private:
        Singleton() {};
        Singleton(Singleton const&);
        void operator=(Singleton const&);
};
*/