esp-cpp / espp

C++ components for ESP
https://esp-cpp.github.io/espp/
MIT License
28 stars 9 forks source link

feat(nvs): NVSHandle Wrapper #257

Closed guraj closed 2 weeks ago

guraj commented 1 month ago

Description

This addition to nvs.hpp is to add functions that allow the user to open an NVS handle, perform multiple get/set operations, and then close the handle. Furthermore, these functions wrap the error handling for better readability for the user.

Motivation and Context

The existing ESPP wrapper for the NVS component has get/set functions to interact with variables in NVS, but each get/set call inefficiently opens and closes an NVS handle.

How has this been tested?

The example app nvs/example/nvs_example.cpp demonstrates the features of this handle, essentially replicating the nvs_rw_value_cxx example app in esp-idf but using ESPP conventions instead.

github-actions[bot] commented 3 weeks ago

:white_check_mark:Static analysis result - no issues found! :white_check_mark: