2025-11-13 8:20 AM
I would like to read some data from the EEPROM on initialization to use in the TouchGFX application.
I currently have an API that can request read/write operations from TouchGFX to the backend.
At the moment, I've implemented it in the Model.hpp
void bind(ModelListener* listener)
{
modelListener = listener;
if (!storageInitialized) {
initializeFromStorage();
storageInitialized = true;
}
}with
void Model::initializeFromStorage()
{
#ifndef SIMULATOR
StorageResponse_t wr = Storage_Request(STORAGE_CMD_READ,
EEPROM_ADDR_STRUCT_2,
&struct2,
sizeof(struct2));
wr = Storage_Request(STORAGE_CMD_READ,
EEPROM_ADDR_STRUCT_1,
&struct1,
sizeof(struct1));
#endif
}but I'm not sure if it's the correct location.
I just want to send the read EEPROM command on the first load of TouchGFX and never again