Main class for basic functions.
More...
#include "EEPROMextent.h"
|
uint8_t | readByte (int address) |
|
void | writeByte (int address, uint8_t value) |
|
void | updateByte (int address, uint8_t value) |
|
template<class T > |
int | readAnything (int address, T &value) |
|
template<class T > |
int | writeAnything (int address, const T &value) |
|
template<class T > |
int | updateAnything (int address, const T &value) |
|
char * | readString (int address, char *outString, int inMaxLen) |
|
int | writeString (int address, const char *inString) |
|
int | updateString (int address, const char *inString) |
|
void | clear (int address, int inSize, byte inFillCharacter = 0) |
|
Definition at line 58 of file EEPROMextent.h.
void EEPROMextentClass::clear |
( |
int |
address, |
|
|
int |
inSize, |
|
|
byte |
inFillCharacter = 0 |
|
) |
| |
Clear the content of the memory, starting from the given address for the given size. Clear means fill the memory with 0s, or with the given byte value.
- Parameters
-
address | EEPROM address to begin to clear. |
inSize | size of memory to clear. |
inFillCharacter | chracter to write in this memory area. 0 is the default. |
Definition at line 61 of file EEPROMextent.cpp.
template<class T >
int EEPROMextentClass::readAnything |
( |
int |
address, |
|
|
T & |
value |
|
) |
| |
|
inline |
Read one object starting from the given address. The size of the object is automatically computed.
- Parameters
-
address | EEPROM address to read. |
value | object to fill with the bytes loaded from EEPROM memory. |
- Returns
- Number of bytes loaded.
- See also
- writeAnything()
-
updateAnything()
Definition at line 99 of file EEPROMextent.h.
uint8_t EEPROMextentClass::readByte |
( |
int |
address | ) |
|
|
inline |
char * EEPROMextentClass::readString |
( |
int |
address, |
|
|
char * |
outString, |
|
|
int |
inMaxLen |
|
) |
| |
Read a string starting from the given address, until its end of the maximum length given.
- Parameters
-
address | EEPROM address to read. |
outString | char array to fill with the bytes loaded from EEPROM memory. |
inMaxLen | Maximum size of the string, which should be the size of the recepting buffer set in outString parameter. |
- Returns
- Number of bytes loaded.
- See also
- writeString()
-
updateString()
Definition at line 12 of file EEPROMextent.cpp.
template<class T >
int EEPROMextentClass::updateAnything |
( |
int |
address, |
|
|
const T & |
value |
|
) |
| |
|
inline |
Update one object starting to the given address. The size of the object is automatically computed. Update each byte of the object starting at the given address. If the content of this address is already of this value, it does not write the byte. This function will be longer (read + write) if the byte have to be written, and faster (only read) if the content is already correct.
- Parameters
-
address | EEPROM address to update. |
value | object to store at this address, for the size ( |
- See also
- sizeof()) of this object.
- Returns
- Number of bytes written.
- See also
- readAnything()
-
updateAnything()
Definition at line 131 of file EEPROMextent.h.
void EEPROMextentClass::updateByte |
( |
int |
address, |
|
|
uint8_t |
value |
|
) |
| |
|
inline |
Update one byte at the given address. If the content of this address is already of this value, it does not write the byte. This function will be longer (read + write) if the byte have to be written, and faster (only read) if the content is already correct.
- Parameters
-
address | EEPROM address to write to. |
value | new value of this address. |
- See also
- readByte()
-
updateByte()
Definition at line 85 of file EEPROMextent.h.
int EEPROMextentClass::updateString |
( |
int |
address, |
|
|
const char * |
inString |
|
) |
| |
Update a string starting to the given address until its end. If the content of this address is already of this value, it does not write the byte. This function will be longer (read + write) if the byte have to be written, and faster (only read) if the content is already correct.
- Parameters
-
address | EEPROM address to begin to update. |
inString | char array to store in EEPROM memory. |
- Returns
- Number of bytes written.
- See also
- readString()
-
updateString()
Definition at line 44 of file EEPROMextent.cpp.
template<class T >
int EEPROMextentClass::writeAnything |
( |
int |
address, |
|
|
const T & |
value |
|
) |
| |
|
inline |
Write one object starting to the given address. The size of the object is automatically computed.
- Parameters
-
address | EEPROM address to begin to write to. |
value | object to store at this address, for the size (with sizeof()) of this object. |
- Returns
- Number of bytes written.
- See also
- readAnything()
-
updateAnything()
Definition at line 113 of file EEPROMextent.h.
void EEPROMextentClass::writeByte |
( |
int |
address, |
|
|
uint8_t |
value |
|
) |
| |
|
inline |
Write one byte to the given address.
- Parameters
-
address | EEPROM address to write to. |
value | new value of this address. |
- See also
- readByte()
-
updateByte()
Definition at line 76 of file EEPROMextent.h.
int EEPROMextentClass::writeString |
( |
int |
address, |
|
|
const char * |
inString |
|
) |
| |
Write a string starting to the given address until its end.
- Parameters
-
address | EEPROM address to begin to write to. |
inString | char array to store in EEPROM memory. |
- Returns
- Number of bytes written.
- See also
- readString()
-
updateString()
Definition at line 27 of file EEPROMextent.cpp.
The documentation for this class was generated from the following files: