Small typo fix
Signed-off-by: krzychb Merges https://github.com/espressif/esp-idf/pull/1331
This commit is contained in:
parent
866b84b9f8
commit
0f2d417a74
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ void app_main()
|
||||||
// Read
|
// Read
|
||||||
printf("Reading restart counter from NVS ... ");
|
printf("Reading restart counter from NVS ... ");
|
||||||
int32_t restart_counter = 0; // value will default to 0, if not set yet in NVS
|
int32_t restart_counter = 0; // value will default to 0, if not set yet in NVS
|
||||||
err = nvs_get_i32(my_handle, "restart_conter", &restart_counter);
|
err = nvs_get_i32(my_handle, "restart_counter", &restart_counter);
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case ESP_OK:
|
case ESP_OK:
|
||||||
printf("Done\n");
|
printf("Done\n");
|
||||||
|
@ -57,7 +57,7 @@ void app_main()
|
||||||
// Write
|
// Write
|
||||||
printf("Updating restart counter in NVS ... ");
|
printf("Updating restart counter in NVS ... ");
|
||||||
restart_counter++;
|
restart_counter++;
|
||||||
err = nvs_set_i32(my_handle, "restart_conter", restart_counter);
|
err = nvs_set_i32(my_handle, "restart_counter", restart_counter);
|
||||||
printf((err != ESP_OK) ? "Failed!\n" : "Done\n");
|
printf((err != ESP_OK) ? "Failed!\n" : "Done\n");
|
||||||
|
|
||||||
// Commit written value.
|
// Commit written value.
|
||||||
|
|
Loading…
Reference in a new issue