Class to provide simple access to I2C EEPROM chiles like Microchip's 24LC range or AMTELS AT24C range. Chips up to 64Kb in size are directly supported. Updated to Mbed OS v 5.1
Diff: I2CEeprom.h
- Revision:
- 4:d8f51b136dbd
- Parent:
- 2:f3188aaccf80
- Child:
- 5:315872eec0ae
--- a/I2CEeprom.h Sat Mar 28 01:38:00 2020 +0000 +++ b/I2CEeprom.h Sat Mar 28 01:50:44 2020 +0000 @@ -93,7 +93,10 @@ // Validate that the proposed opperation will fit in the size of // the chip. - bool checkSpace(size_t address, size_t size); + bool checkSpace(size_t address, size_t size) + { + return (address + size) < m_chipSize ; + } private: I2C & m_i2c;