Skip to content

Commit

Permalink
bugfix: Change namespace variable to nvs_namespace (C++ compatibility)
Browse files Browse the repository at this point in the history
Closes #11028
  • Loading branch information
Kampi authored and 0xjakob committed Mar 30, 2023
1 parent ef4b1b7 commit e66a175
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/system/ulp_fsm/ulp/main/ulp_example_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ static void init_ulp_program(void)

static void update_pulse_count(void)
{
const char* namespace = "plusecnt";
const char* nvs_namespace = "plusecnt";
const char* count_key = "count";

ESP_ERROR_CHECK( nvs_flash_init() );
nvs_handle_t handle;
ESP_ERROR_CHECK( nvs_open(namespace, NVS_READWRITE, &handle));
ESP_ERROR_CHECK( nvs_open(nvs_namespace, NVS_READWRITE, &handle));
uint32_t pulse_count = 0;
esp_err_t err = nvs_get_u32(handle, count_key, &pulse_count);
assert(err == ESP_OK || err == ESP_ERR_NVS_NOT_FOUND);
Expand Down

0 comments on commit e66a175

Please sign in to comment.