#include <ArduinoEEPROMAbstraction.h>
Public Member Functions | |
ArduinoEEPROMAbstraction (EEPROMClass *proxy) | |
uint8_t | read8 (EepromPosition position) override |
uint16_t | read16 (EepromPosition pos) override |
uint32_t | read32 (EepromPosition pos) override |
void | write8 (EepromPosition pos, uint8_t val) override |
void | write16 (EepromPosition pos, uint16_t val) override |
void | write32 (EepromPosition pos, uint32_t val) override |
void | readIntoMemArray (uint8_t *memDest, EepromPosition romSrc, uint8_t len) override |
void | writeArrayToRom (EepromPosition romDest, const uint8_t *memSrc, uint8_t len) override |
Public Member Functions inherited from EepromAbstraction | |
virtual bool | hasErrorOccurred () |
Provides a wrapper around the EEPROM class available on some Arduino boards. For AVR 8bit boards such as Uno and Mega, there are no notes, it neatly wraps the class.
Extra notes for ESP8266, ESP32 and any other FLASH emulated implementation: When the ESP EEPROM wrapper is used, then you need to ensure that you call begin(size) before use and commit() before shutting down, otherwise changes will not be saved. Be very aware that you must not commit too frequently; otherwise your board's FLASH will be damaged. I recommend the very cheap i2c AT24Cxxx EEPROM devices which cost about $1 and you will not risk damaging your FLASH. Me having implemented this is not an indicator that I agree with using FLASH as EEPROM, I personally wouldn't do that on a production board.
|
inlineoverridevirtual |
Read an 8 bit (byte) value at a specified position
position | address at which to read |
Implements EepromAbstraction.
|
inlineoverridevirtual |
read a 16 bit value at position at a specified position
position | the position at which to read |
Implements EepromAbstraction.
|
inlineoverridevirtual |
read a 32 bit value at a specified position
position | the position at which to read |
Implements EepromAbstraction.
|
inlineoverridevirtual |
write an 8 bit (byte) value to the specified position
position | the position at which to write |
val | the new value |
Implements EepromAbstraction.
|
inlineoverridevirtual |
write a 16 bit value to the specified position
position | the position at which to write |
val | the value to read |
Implements EepromAbstraction.
|
inlineoverridevirtual |
write a 32 bit value to position
position | the position at which to write |
val | the value to write out. |
Implements EepromAbstraction.
|
inlineoverridevirtual |
Read an array of bytes from EEPROM into memory
memDest | the memory where the EEPROM data should be copied to |
romSrc | the source position in EEPROM storage |
len | the length of the array |
Implements EepromAbstraction.
|
inlineoverridevirtual |
Writes an array of bytes from memory to EEPROM storage
romDest | the start position in eeprom storage that the array should be copied to |
memSrc | the memory where the rom should be copied from |
len | the length of the array |
Implements EepromAbstraction.