I have a C program which has always used hard coded define statements for a few settings. Example...
#define TRIGGER_TIMEOUT 50000
This has worked just fine. Now, this setting is to become adjustable. Example...
g_ulTriggerTimeout = ReadEEPROM(TRIGGER_TIMEOUT_OFFSET);
If persistent storage is detected (EEPROM) then the value will be read in and used. So, my safe literal value is now at risk of being corrupted (inadvertently written changed). I need to make this variable a constant, however I also need to read in the initial values from EEPROM. How is this scenario typically solved?