Add NVS storage handler and integrate with main application logic
This commit is contained in:
21
main/io/nvs_handler.h
Normal file
21
main/io/nvs_handler.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "io/io.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "nvs.h"
|
||||
|
||||
class NVSStorageHandler : public KVStorageHandler {
|
||||
public:
|
||||
NVSStorageHandler() = default;
|
||||
~NVSStorageHandler() override;
|
||||
|
||||
void init(const EventGroupHandle_t& system_event_group) override;
|
||||
|
||||
void put(const char*& key, const char*& value) override;
|
||||
|
||||
char* get(const char*& key) const override;
|
||||
|
||||
void remove(const char*& key) override;
|
||||
|
||||
private:
|
||||
nvs_handle_t nvsHandle = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user