A ferroelectric random access memory or F-RAM is nonvolatile and performs reads and writes similar to a RAM.
Diff: FM24V10.h
- Revision:
- 1:b9f6d029c760
- Parent:
- 0:e4b7a2f63736
--- a/FM24V10.h Tue Feb 03 19:56:43 2015 +0000 +++ b/FM24V10.h Tue Mar 08 22:59:15 2016 +0000 @@ -6,22 +6,23 @@ class FM24V10 { public : + /* + *The speed grades (standard mode: 100 kbit/s, full speed: 400 kbit/s, fast mode: 1 mbit/s, high speed: 3,2 Mbit/s) are maximum ratings. Compliant hardware guaranties that it can handle transmission speed up to the maximum clock rate specified by the mode. + */ enum SPEED_MODE { STANDARD,FULL,FAST,HIGH }; - FM24V10(PinName sda, PinName scl, bool A1, bool A2); + FM24V10(PinName sda, PinName scl, bool A1, bool A2, SPEED_MODE speed = FULL); - FM24V10(PinName sda, PinName scl, bool A1, bool A2, SPEED_MODE speed); + void WriteShort(int position, int value, bool Hs_mode = false); - void WriteShort(int position, int value, bool Hs_mode); - - void WriteShort(int position, int * value, int size, bool Hs_mode); + void WriteShort(int position, int * value, int size, bool Hs_mode = false); - void ReadShort(int position, int * value, int size, bool Hs_mode); - - int ReadShort(int position, bool Hs_mode); - + void ReadShort(int position, int * value, int size, bool Hs_mode = false); + + int ReadShort(int position, bool Hs_mode = false); + private : static const int HS_COMMAND = 0x09; @@ -33,7 +34,7 @@ I2C _i2c_bus; int _speed; int _addr; - + int result; void Init(bool A1, bool A2);