EEPROMEx
1.0.0
EEPROMEX is an extension of the standard Arduino EEPROM library for reading and writing basic types, structs, strings, arrays and more.
|
Public Member Functions | |
bool | isReady () |
int | writtenBytes () |
void | setMemPool (int base, int memSize) |
void | setMaxAllowedWrites (int allowedWrites) |
int | getAddress (int noOfBytes) |
uint8_t | read (int) |
bool | readBit (int, byte) |
uint8_t | readByte (int) |
uint16_t | readInt (int) |
uint32_t | readLong (int) |
float | readFloat (int) |
double | readDouble (int) |
bool | write (int, uint8_t) |
bool | writeBit (int, uint8_t, bool) |
bool | writeByte (int, uint8_t) |
bool | writeInt (int, uint16_t) |
bool | writeLong (int, uint32_t) |
bool | writeFloat (int, float) |
bool | writeDouble (int, double) |
bool | update (int, uint8_t) |
bool | updateBit (int, uint8_t, bool) |
bool | updateByte (int, uint8_t) |
bool | updateInt (int, uint16_t) |
bool | updateLong (int, uint32_t) |
bool | updateFloat (int, float) |
bool | updateDouble (int, double) |
template<class T > | |
int | readBlock (int address, const T value[], int items) |
template<class T > | |
int | readBlock (int address, const T &value) |
template<class T > | |
int | writeBlock (int address, const T value[], int items) |
template<class T > | |
int | writeBlock (int address, const T &value) |
template<class T > | |
int | updateBlock (int address, const T value[], int items) |
template<class T > | |
int | updateBlock (int address, const T &value) |
int EEPROMClassEx::getAddress | ( | int | noOfBytes | ) |
Get a new starting address to write to. Adress is negative if not enough space is available
bool EEPROMClassEx::isReady | ( | ) |
Check if EEPROM memory is ready to be accessed
uint8_t EEPROMClassEx::read | ( | int | address | ) |
Read a single byte This function performs as readByte and is added to be similar to the EEPROM library
References readByte().
Referenced by updateBlock().
bool EEPROMClassEx::readBit | ( | int | address, |
byte | bit | ||
) |
Read a single bit
int EEPROMClassEx::readBlock | ( | int | address, |
const T | value[], | ||
int | items | ||
) | [inline] |
Template function to read multiple items of any type of variable, such as structs
int EEPROMClassEx::readBlock | ( | int | address, |
const T & | value | ||
) | [inline] |
Template function to read any type of variable, such as structs
uint8_t EEPROMClassEx::readByte | ( | int | address | ) |
Read a single byte
Referenced by read(), and updateBit().
double EEPROMClassEx::readDouble | ( | int | address | ) |
Read a single double value (size will depend on board type)
float EEPROMClassEx::readFloat | ( | int | address | ) |
Read a single float value
uint16_t EEPROMClassEx::readInt | ( | int | address | ) |
Read a single 16 bits integer
uint32_t EEPROMClassEx::readLong | ( | int | address | ) |
Read a single 32 bits integer
void EEPROMClassEx::setMaxAllowedWrites | ( | int | allowedWrites | ) |
Set global maximum of allowed writes
void EEPROMClassEx::setMemPool | ( | int | base, |
int | memSize | ||
) |
Set starting position and memory size that EEPROMEx may manage
bool EEPROMClassEx::update | ( | int | address, |
uint8_t | value | ||
) |
Update a single byte The EEPROM will only be overwritten if different. This will reduce wear. This function performs as updateByte and is added to be similar to the EEPROM library
References updateByte().
bool EEPROMClassEx::updateBit | ( | int | address, |
uint8_t | bit, | ||
bool | value | ||
) |
Update a single bit The EEPROM will only be overwritten if different. This will reduce wear.
References readByte(), and writeByte().
Referenced by writeBit().
int EEPROMClassEx::updateBlock | ( | int | address, |
const T | value[], | ||
int | items | ||
) | [inline] |
Template function to update multiple items of any type of variable, such as structs The EEPROM will only be overwritten if different. This will reduce wear.
int EEPROMClassEx::updateBlock | ( | int | address, |
const T & | value | ||
) | [inline] |
bool EEPROMClassEx::updateByte | ( | int | address, |
uint8_t | value | ||
) |
Update a single byte The EEPROM will only be overwritten if different. This will reduce wear.
Referenced by update().
bool EEPROMClassEx::updateDouble | ( | int | address, |
double | value | ||
) |
Update a single double value (size will depend on board type) The EEPROM will only be overwritten if different. This will reduce wear.
bool EEPROMClassEx::updateFloat | ( | int | address, |
float | value | ||
) |
Update a single float value The EEPROM will only be overwritten if different. This will reduce wear.
bool EEPROMClassEx::updateInt | ( | int | address, |
uint16_t | value | ||
) |
Update a single 16 bits integer The EEPROM will only be overwritten if different. This will reduce wear.
bool EEPROMClassEx::updateLong | ( | int | address, |
uint32_t | value | ||
) |
Update a single 32 bits integer The EEPROM will only be overwritten if different. This will reduce wear.
bool EEPROMClassEx::write | ( | int | address, |
uint8_t | value | ||
) |
Write a single byte This function performs as writeByte and is added to be similar to the EEPROM library
References writeByte().
Referenced by updateBlock().
bool EEPROMClassEx::writeBit | ( | int | address, |
uint8_t | bit, | ||
bool | value | ||
) |
Write a single bit
References updateBit().
int EEPROMClassEx::writeBlock | ( | int | address, |
const T | value[], | ||
int | items | ||
) | [inline] |
Template function to write multiple items of any type of variable, such as structs
int EEPROMClassEx::writeBlock | ( | int | address, |
const T & | value | ||
) | [inline] |
Template function to write any type of variable, such as structs
bool EEPROMClassEx::writeByte | ( | int | address, |
uint8_t | value | ||
) |
Write a single byte
Referenced by updateBit(), and write().
bool EEPROMClassEx::writeDouble | ( | int | address, |
double | value | ||
) |
Write a single double value (size will depend on board type)
bool EEPROMClassEx::writeFloat | ( | int | address, |
float | value | ||
) |
Write a single float value
bool EEPROMClassEx::writeInt | ( | int | address, |
uint16_t | value | ||
) |
Write a single 16 bits integer
bool EEPROMClassEx::writeLong | ( | int | address, |
uint32_t | value | ||
) |
Write a single 32 bits integer