tcMenu
Loading...
Searching...
No Matches
DynamicEepromStore Class Reference

Static Public Member Functions

static bool loadMenuStructure (EepromAbstraction *eeprom, uint16_t magicKey=0xf00d)
static bool saveMenuStructure (EepromAbstraction *eeprom, uint16_t magicKey=0xf00d)

Member Function Documentation

◆ loadMenuStructure()

bool DynamicEepromStore::loadMenuStructure ( EepromAbstraction * eeprom,
uint16_t magicKey = 0xf00d )
static

We load items from the eeprom one at a time, each item is in memory has a two byte ID, then two bytes for size, followed by the data for that size. This mode of operation has to write the menu structure out in full each time, whereas the position based ROM utilities only wrote an item if it changed.

Parameters
eeproman IoAbstraction EEPROM reference.
magicKeythey magic key (must be the same as when written)
Returns
true if fully loaded, otherwise false.

◆ saveMenuStructure()

bool DynamicEepromStore::saveMenuStructure ( EepromAbstraction * eeprom,
uint16_t magicKey = 0xf00d )
static

Save out a menu structure dynamically. The magic key is written first, and must match for the structure to be read back. Each item has a two byte ID and two byte length, if the menu item still exists and its EEPROM address is not 0xFFFF then it will be populated with the new value.

Parameters
eepromthe IoAbstraction EEPROM reference
magicKeythe magic key that must be the same when loaded back.
Returns
true if successful, otherwise false

The documentation for this class was generated from the following files: