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:
- 6:0b18a49e03b9
- Parent:
- 5:315872eec0ae
- Child:
- 7:29e505d37158
--- a/I2CEeprom.h Sat Mar 28 11:19:53 2020 +0000 +++ b/I2CEeprom.h Sat Mar 28 12:51:37 2020 +0000 @@ -1,5 +1,3 @@ -#ifndef __I2CEEPROM_H__ -#define __I2CEEPROM_H__ /* Simple access class for I2C EEPROM chips like Microchip 24LC * Copyright (c) 2015 Robin Hourahane * @@ -15,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +#ifndef __I2CEEPROM_H__ +#define __I2CEEPROM_H__ #include <mbed.h> @@ -30,15 +31,10 @@ public: /// Constructor to create a new instance of the class. /// @param i2c a reference to the i2c bus the chip is connected to. - /// @param address The 8bit I2C address of the chip + /// @param address The 8bit I2C address of the chip. /// @param pageSize The size of the page used in writing to the chip. /// @param chipSize The size of the memory in the chip for range check. - /// Set to 0 to disable checks. - /// @param writeCycleTime_ms The write cycle time in ms. After a write - /// The thread will be put to sleep for this time before being polled - /// at 1 ms intervals to check the write has completed. - /// TODO : Could use bus frequency to cap the speed of the bus - /// Would need a way to read bus frequency + /// @param writeCycleTime_ms The write cycle time in ms. I2CEeprom( I2C& i2c, int address,