nvs_utilities.h 743 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include "esp_err.h"
  3. #include "nvs.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. extern const char current_namespace[];
  8. extern const char settings_partition[];
  9. #define NUM_BUFFER_LEN 101
  10. void initialize_nvs();
  11. esp_err_t store_nvs_value_len(nvs_type_t type, const char *key, void * data, size_t data_len);
  12. esp_err_t store_nvs_value(nvs_type_t type, const char *key, void * data);
  13. esp_err_t get_nvs_value(nvs_type_t type, const char *key, void*value, const uint8_t buf_size);
  14. void * get_nvs_value_alloc(nvs_type_t type, const char *key);
  15. esp_err_t erase_nvs(const char *key);
  16. void print_blob(const char *blob, size_t len);
  17. const char *type_to_str(nvs_type_t type);
  18. nvs_type_t str_to_type(const char *type);
  19. #ifdef __cplusplus
  20. }
  21. #endif