104template<
typename T >
131template<
typename T >
uint8_t byte
Definition config_pages.h:16
static TIntegral readSerialIntegralTimeout(void)
Reads an integral type, timing out if necessary.
Definition comms.cpp:175
The statuses struct and related defines.
uint16_t updateBlockLimitWriteOps(const storage_api_t &api, uint16_t address, const byte *pFirst, const byte *pLast, uint16_t maxWrites)
Conditionally write bytes from block of memory to storage, with a limited number of write operations.
Definition storage_api.cpp:61
static void updateObject(const storage_api_t &api, const T &t, uint16_t address)
Conditionally write bytes from a POD object to storage. Values are written only if they differ from t...
Definition storage_api.h:105
uint8_t byte
Definition storage_api.h:10
void moveBlock(const storage_api_t &api, uint16_t dest, uint16_t source, uint16_t size)
Move a block of bytes.
Definition storage_api.cpp:87
bool update(const storage_api_t &api, uint16_t address, byte value)
Conditionally write a byte to storage if it differs from the one already saved.
Definition storage_api.cpp:47
storage_api_t getEEPROMStorageApi(void)
Create a storage_api_t instance that wraps getEEPROM()
Definition storage_api.cpp:36
static T & loadObject(const storage_api_t &api, uint16_t address, T &t)
Copy a block of data from storage into a POD object.
Definition storage_api.h:132
void updateBlock(const storage_api_t &api, uint16_t address, const byte *pFirst, const byte *pLast)
Conditionally write bytes from block of memory to storage. Values are written only if they differ fro...
Definition storage_api.cpp:55
void fillBlock(const storage_api_t &api, uint16_t address, uint16_t length, byte value)
Fills the given block with a constant.
Definition storage_api.cpp:81
uint16_t loadBlock(const storage_api_t &api, int16_t address, byte *pFirst, const byte *pLast)
Copy a block of data from storage to memory.
Definition storage_api.cpp:73
The status struct with current values for all 'live' variables.
Definition statuses.h:24
The external storage API. This must be supported by any storage system. E.g. EEPROM,...
Definition storage_api.h:18
uint16_t(* length)(void)
Function to get the size of the address space.
Definition storage_api.h:30
byte(* read)(uint16_t address)
Function to read a single byte from storage.
Definition storage_api.h:20
uint16_t(* getMaxWriteBlockSize)(const statuses ¤t)
The maximum number of write operations that will be performed in one go.
Definition storage_api.h:33
void(* write)(uint16_t address, byte val)
Function to write a single byte to storage.
Definition storage_api.h:23