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:
- 1:bdf87ab4cdb8
- Parent:
- 0:21c698aa86f6
- Child:
- 2:16ce7dae9019
--- a/24LCxx_I2C.h Wed Oct 17 07:15:33 2012 +0000 +++ b/24LCxx_I2C.h Fri Jan 25 09:24:05 2013 +0000 @@ -46,7 +46,7 @@ class C24LCXX_I2C { // TODO: Add EE Polling for write methods /** Reference counter used to guarentee unicity of the instance of I2C class */ - static unsigned char I2CMouduleRefCounter; + static unsigned char I2CModuleRefCounter; /** Device address input: A0, A1, A2 (Pins <1,3>). See DS21203K/DS21189D - Figure 5-1: Control Byte Format for address format details */ @@ -90,7 +90,7 @@ * * @paramp_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. Defqult vqlue: 0x00 + * @param p_pattern The pattern value to use to fill the memory area. Default vqlue: 0x00 * @return true on success, false otherwise * Exemple: * @code @@ -247,7 +247,7 @@ * @param p_address The memory address (from 0 to N - 1, N is the number of cells of the memory) * @param p_datas The buffer to fill * @param p_readLengthFirst If true, read the length first and p_length2write parameter is ignored, otherwise the length is provided by p_length2write parameter. Default value: true - * @param p_length2write The number of character to write, -1 to use the size of the string buffer + * @param p_length2read The number of character to write, -1 to use the size of the string buffer * @return true on success, false otherwise * Exemple: * @code @@ -257,7 +257,7 @@ * ... * @endcode */ - bool Read(const short p_address, std::vector<unsigned char> & p_datas, bool p_readLengthFirst = true, int p_length2write = -1); + bool Read(const short p_address, std::vector<unsigned char> & p_datas, bool p_readLengthFirst = true, int p_length2read = -1); /** Read a buffer of characters from the specified memory address and store it into a string object *