Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 7 months ago.
Saving configuration to NVRAM
Hi,
Looking at the saveConfig() and resetConfig() in the example, program. How does the libmDot know to just read the previously saved config instead of resetting to factory defaults and allowing the stored configuration to be used? There doesn't appear to be a loadConfg() unless this is done when the library is first called.
Thanks
Andrew
Question relating to:
1 Answer
8 years, 7 months ago.
Hi Andrew, The library loads configuration as part of the initialization process that happens when you call mDot::getInstance() and the object is instantiated. If the config file exists in NVM at that point (e.g. mDot::saveConfig() had been called sometime before), it is loaded, otherwise factory default configuration is used.
Cheers, Mike