nvs_utilities.h 651 B

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