![]() |
MySensors Library & Examples
2.3.2
|
This a software emulation of EEPROM that uses a file for data storage. A copy of the eeprom values are also held in memory for faster reading. SoftEeprom class
Definition at line 33 of file SoftEeprom.h.
#include <SoftEeprom.h>
Collaboration diagram for SoftEeprom:Public Member Functions | |
| SoftEeprom () | |
| SoftEeprom constructor. | |
| SoftEeprom (const SoftEeprom &other) | |
| SoftEeprom copy constructor. | |
| ~SoftEeprom () | |
| SoftEeprom destructor. | |
| int | init (const char *fileName, size_t length) |
| Initializes the eeprom class. More... | |
| void | destroy () |
| Clear all allocated memory variables. More... | |
| void | readBlock (void *buf, void *addr, size_t length) |
| Read a block of bytes from eeprom. More... | |
| void | writeBlock (void *buf, void *addr, size_t length) |
| Write a block of bytes to eeprom. More... | |
| uint8_t | readByte (int addr) |
| Read a byte from eeprom. More... | |
| void | writeByte (int addr, uint8_t value) |
| Write a byte to eeprom. More... | |
| SoftEeprom & | operator= (const SoftEeprom &other) |
| Overloaded assign operator. More... | |
| void SoftEeprom::destroy | ( | ) |
Clear all allocated memory variables.
| int SoftEeprom::init | ( | const char * | fileName, |
| size_t | length | ||
| ) |
Initializes the eeprom class.
| fileName | filepath where the data is saved. |
| length | eeprom size in bytes. |
| SoftEeprom& SoftEeprom::operator= | ( | const SoftEeprom & | other | ) |
Overloaded assign operator.
| void SoftEeprom::readBlock | ( | void * | buf, |
| void * | addr, | ||
| size_t | length | ||
| ) |
Read a block of bytes from eeprom.
| buf | buffer to copy to. |
| addr | eeprom address to read from. |
| length | number of bytes to read. |
| uint8_t SoftEeprom::readByte | ( | int | addr | ) |
Read a byte from eeprom.
| addr | eeprom address to read from. |
| void SoftEeprom::writeBlock | ( | void * | buf, |
| void * | addr, | ||
| size_t | length | ||
| ) |
Write a block of bytes to eeprom.
| buf | buffer to read from. |
| addr | eeprom address to write to. |
| length | number of bytes to write. |
| void SoftEeprom::writeByte | ( | int | addr, |
| uint8_t | value | ||
| ) |
Write a byte to eeprom.
| addr | eeprom address to write to. |
| value | to write. |