Device to measure angle and get IMU measurements.

Dependencies:   mbed commands BLE_API nRF51822

Committer:
dkester
Date:
Sun Jun 07 14:11:26 2015 +0000
Revision:
5:46947b447701
Parent:
4:2a5a08b14539
Child:
6:75263c93daf7
Werking

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dkester 0:1c5088dae6e1 1 #ifndef _STORAGE_H_
dkester 0:1c5088dae6e1 2 #define _STORAGE_H_
dkester 0:1c5088dae6e1 3
dkester 0:1c5088dae6e1 4 #include "mbed.h"
dkester 0:1c5088dae6e1 5
dkester 0:1c5088dae6e1 6 class Storage
dkester 0:1c5088dae6e1 7 {
dkester 0:1c5088dae6e1 8 static Storage* instance;
dkester 0:1c5088dae6e1 9 Storage();
dkester 0:1c5088dae6e1 10
dkester 0:1c5088dae6e1 11 public:
dkester 0:1c5088dae6e1 12
dkester 0:1c5088dae6e1 13 static Storage* getInstance();
dkester 3:a3e1a06c486d 14 void setup();
dkester 4:2a5a08b14539 15 void setWREN();
dkester 4:2a5a08b14539 16 void setWRDI();
dkester 4:2a5a08b14539 17 int8_t getSR1();
dkester 4:2a5a08b14539 18 int8_t getSR2();
dkester 4:2a5a08b14539 19 void clearSR();
dkester 3:a3e1a06c486d 20 bool isBusy();
dkester 3:a3e1a06c486d 21 void endAction();
dkester 3:a3e1a06c486d 22
dkester 3:a3e1a06c486d 23 void pageProgram(int32_t addr);
dkester 3:a3e1a06c486d 24 void writeData(int8_t data);
dkester 3:a3e1a06c486d 25
dkester 3:a3e1a06c486d 26 void read(int32_t addr);
dkester 3:a3e1a06c486d 27 int8_t readData();
dkester 4:2a5a08b14539 28
dkester 4:2a5a08b14539 29 void bulkErase();
dkester 5:46947b447701 30 void sectorErase(int32_t addr);
dkester 4:2a5a08b14539 31 void reset();
dkester 0:1c5088dae6e1 32
dkester 0:1c5088dae6e1 33 };
dkester 0:1c5088dae6e1 34
dkester 5:46947b447701 35 #endif /* _STORAGE_H_ */
dkester 5:46947b447701 36
dkester 5:46947b447701 37
dkester 5:46947b447701 38
dkester 5:46947b447701 39 /*
dkester 5:46947b447701 40 class Singleton
dkester 5:46947b447701 41 {
dkester 5:46947b447701 42 private:
dkester 5:46947b447701 43 int mData;
dkester 5:46947b447701 44
dkester 5:46947b447701 45 public:
dkester 5:46947b447701 46 static Singleton& getInstance()
dkester 5:46947b447701 47 {
dkester 5:46947b447701 48 static Singleton instance;
dkester 5:46947b447701 49 return instance;
dkester 5:46947b447701 50 }
dkester 5:46947b447701 51 int GetData()
dkester 5:46947b447701 52 {
dkester 5:46947b447701 53 return mData;
dkester 5:46947b447701 54 }
dkester 5:46947b447701 55 private:
dkester 5:46947b447701 56 Singleton() {};
dkester 5:46947b447701 57 Singleton(Singleton const&);
dkester 5:46947b447701 58 void operator=(Singleton const&);
dkester 5:46947b447701 59 };
dkester 5:46947b447701 60 */