feat: implement LittleFSHandler and FSGuard for improved file management
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "io/io.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "io/fs_handler.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "freertos/event_groups.h"
|
||||
|
||||
@@ -13,7 +14,7 @@ public:
|
||||
// this handler is used to store/retrieve WiFi credentials
|
||||
// should have a unique namespace for WiFi credentials
|
||||
// it will be owned by WifiHandler and deleted in its destructor
|
||||
std::unique_ptr<KVStorageHandler> kvs
|
||||
std::shared_ptr<LittleFSHandler> fs_handler_
|
||||
);
|
||||
~WifiHandler();
|
||||
|
||||
@@ -44,7 +45,7 @@ private:
|
||||
void get_wifi_credentials(std::string& out_ssid, std::string& out_password);
|
||||
|
||||
bool initialized = false;
|
||||
std::unique_ptr<KVStorageHandler> kvs = nullptr;
|
||||
std::shared_ptr<LittleFSHandler> fs_handler_ = nullptr;
|
||||
EventGroupHandle_t s_wifi_event_group = 0;
|
||||
SemaphoreHandle_t scan_mutex = nullptr;
|
||||
SemaphoreHandle_t connection_mutex = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user