feat(nvs_flash): Added purging of erased items at namespace level

- Added new option NVS_READWRITE_PURGE for nvs_open. All update and erase operations of
    the handle are wiping out the content erased items on top of just marking them erased.
  - Added new API call nvs_purge_all allowing to wipe out the existing erased items
    of the handle.
This commit is contained in:
radek.tandler
2026-02-05 11:07:43 +01:00
parent b970f0f31b
commit d50c7b4b6b
20 changed files with 757 additions and 129 deletions
@@ -210,6 +210,11 @@ public:
*/
virtual esp_err_t erase_all() = 0;
/**
* Purges all erased entries in the scope of this handle. The scope may vary, depending on the implementation.
*/
virtual esp_err_t purge_all() = 0;
/**
* Commits all changes done through this handle so far.
* Currently, NVS writes to storage right after the set and get functions,