mirror of
https://github.com/usatiuk/cardboy.git
synced 2025-10-28 15:17:48 +01:00
27 lines
588 B
C++
27 lines
588 B
C++
#pragma once
|
|
|
|
#include <esp_err.h>
|
|
|
|
#include <string_view>
|
|
|
|
class FsHelper {
|
|
public:
|
|
static FsHelper& get();
|
|
|
|
esp_err_t mount();
|
|
void unmount();
|
|
|
|
bool isMounted() const { return mounted; }
|
|
const char* basePath() const { return kBasePath; }
|
|
const char* partitionLabel() const { return kPartitionLabel; }
|
|
|
|
private:
|
|
FsHelper() = default;
|
|
|
|
static constexpr const char* kBasePath = "/lfs";
|
|
static constexpr const char* kPartitionLabel = "littlefs";
|
|
static constexpr const bool kFormatOnFailure = true;
|
|
|
|
bool mounted = false;
|
|
};
|