how do I save variables into the nvs?
Posted: Wed Dec 08, 2021 11:37 pm
Hi,
How do I save a variable in the nvs?
I'm looking at the sample nvs_value_example_main, and I can't understand a thing!!!
Say I've got 5 different variables that I want to save into the nvs, and retrieve them whenever I want.
variable_1
variable_2
variable_3
variable_4
variable_5
Can someone give me an example on how to do it?
In the example supplied there is just one single int32_t restart_counter
But I can't understand the address where is being written, and where to read it from whenever you want.
Or is it that you don't assign them an address, but the operating system is looking just for the name of the variable?
Can someone illuminate me please, I'm in total darkness.
How do I save a variable in the nvs?
I'm looking at the sample nvs_value_example_main, and I can't understand a thing!!!
Say I've got 5 different variables that I want to save into the nvs, and retrieve them whenever I want.
variable_1
variable_2
variable_3
variable_4
variable_5
Can someone give me an example on how to do it?
In the example supplied there is just one single int32_t restart_counter
But I can't understand the address where is being written, and where to read it from whenever you want.
Or is it that you don't assign them an address, but the operating system is looking just for the name of the variable?
Can someone illuminate me please, I'm in total darkness.