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) |
|
Main class for basic functions.
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. |
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()
uint8_t EEPROMextentClass::readByte |
( |
int |
address | ) |
|
|
inline |
Read one byte from the given address.
- Parameters
-
address | EEPROM address to read. |
- Returns
- byte read at this address.
- See also
- writeByte()
-
updateByte()
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()
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()
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()
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()
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()
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()
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()
The documentation for this class was generated from the following files:
- D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/EEPROMextent.h
- D:/Mes documents/Trusty/Arduino/Libraries/EEPROMextent/src/EEPROMextent.cpp