This class provides simplified I2C access to a Microchip 24LCxx Serial EEPROM device: - Rename the class (C2424 -> C24) - Add EraseMemoryArea method - Add DumpMemoryArea method only accessible in DEBUG mode - Add 'const' qualifier in parameters
Fork of 24LCxx_I2C by
Diff: 24LCxx_I2C.h
- Revision:
- 2:16ce7dae9019
- Parent:
- 1:bdf87ab4cdb8
- Child:
- 3:5df584fbabfe
--- a/24LCxx_I2C.h Fri Jan 25 09:24:05 2013 +0000 +++ b/24LCxx_I2C.h Thu Jul 18 05:34:34 2013 +0000 @@ -76,7 +76,7 @@ * - If A1 and A2 pins are tired to Vdd and A0 is tired to Vss, address shall '00000110'B * - If A0 and A1 pins are tired to Vss and A2 is tired to Vdd, address shall '00000100'B */ - C24LCXX_I2C(const PinName p_sda, const PinName p_scl, const unsigned char p_address, const PinName p_wp = NC, const int p_frequency = 400000); + C24LCXX_I2C(const PinName p_sda, const PinName p_scl, const unsigned char p_address, const PinName p_wp = NC, const unsigned int p_frequency = 400000); /** Destructor */ @@ -88,7 +88,7 @@ /** Erase of memory area starting at the specified address, using the specified pattern to fill the memory area * - * @paramp_startAddress The address of the memory area (from 0 to N - 1, N is the number of cells of the memory) + * @param p_startAddress The address of the memory area (from 0 to N - 1, N is the number of cells of the memory) * @param p_count The size of the memory area to erase * @param p_pattern The pattern value to use to fill the memory area. Default vqlue: 0x00 * @return true on success, false otherwise @@ -99,7 +99,7 @@ * ... * @endcode */ - bool EraseMemoryArea(const short p_startAddress, const int p_count, unsigned char const p_pattern = 0x00); + bool EraseMemoryArea(const short p_startAddress, const int p_count, const unsigned char p_pattern = 0x00); /** Write a byte at the specified memory address *