Driver library for Microchip I2C EERAM (47x04 and 47x16) 4 kbit or 16 kbit EEPROM backed SRAM.

Dependents:   EERAM_example

Revision:
6:b3f9b29b07ba
Parent:
5:9444f29f3429
Child:
7:038c52e2268b
--- a/EERAM.h	Tue May 09 07:01:45 2017 +0000
+++ b/EERAM.h	Fri Aug 04 05:19:38 2017 +0000
@@ -91,12 +91,12 @@
     * @param A1 EERAM A1 pin state (true = high, false = low)
     * @param A2 EERAM A2 pin state (true = high, false = low)
     */
-    EERAM(PinName SDA, PinName SCL, uint16_t memorySize, bool A1 = false, bool A2 = false) :
-        _i2c(SDA, SCL),
-        _memorySize(memorySize)
-    {
-        initialize(A1, A2);
-    };
+//    EERAM(PinName SDA, PinName SCL, uint16_t memorySize, bool A1 = false, bool A2 = false) :
+//        _i2c(SDA, SCL),
+//        _memorySize(memorySize)
+//    {
+//        initialize(A1, A2);
+//    };
 
     /** Create an I2C EERAM interface, connected to the I2C, with specified size and with the specified address pins.
     * @param 12c I2C
@@ -104,7 +104,7 @@
     * @param A1 EERAM A1 pin state (true = high, false = low)
     * @param A2 EERAM A2 pin state (true = high, false = low)
     */
-    EERAM(I2C &i2c, uint16_t memorySize, bool A1 = false, bool A2 = false) :
+    EERAM(I2C *i2c, uint16_t memorySize, bool A1 = false, bool A2 = false) :
         _i2c(i2c),
         _memorySize(memorySize)
     {
@@ -219,7 +219,7 @@
         {
             if (direct)
             {
-                success = _i2c.read(_sramAddressRead, destinationAsBytes, readLength) == 0;
+                success = _i2c->read(_sramAddressRead, destinationAsBytes, readLength) == 0;
             }
             else
             {
@@ -454,7 +454,7 @@
     static const int TIME_STORE_16_MS = 25;
     static const int TIME_STORE_04_MS = 8;
     static const int TIME_STORE_STATUS_MS = 1;
-    I2C _i2c;
+    I2C *_i2c;
     uint16_t _memorySize;
     uint8_t _sramAddressWrite;
     uint8_t _sramAddressRead;