Remove mount/unmount. No longer needed
This commit is contained in:
parent
c1aa5a5ea7
commit
2e10b0fe64
|
@ -54,14 +54,6 @@ void FS::VerifyResource() {
|
||||||
resourcesValid = true;
|
resourcesValid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FS::Mount() {
|
|
||||||
flashDriver.Wakeup();
|
|
||||||
}
|
|
||||||
|
|
||||||
void FS::UnMount() {
|
|
||||||
flashDriver.Sleep();
|
|
||||||
}
|
|
||||||
|
|
||||||
int FS::FileOpen(lfs_file_t* file_p, const char* fileName, const int flags) {
|
int FS::FileOpen(lfs_file_t* file_p, const char* fileName, const int flags) {
|
||||||
return lfs_file_open(&lfs, file_p, fileName, flags);
|
return lfs_file_open(&lfs, file_p, fileName, flags);
|
||||||
}
|
}
|
||||||
|
@ -107,7 +99,7 @@ int FS::DirCreate(const char* path) {
|
||||||
int FS::Stat(const char* path, lfs_info* info) {
|
int FS::Stat(const char* path, lfs_info* info) {
|
||||||
return lfs_stat(&lfs, path, info);
|
return lfs_stat(&lfs, path, info);
|
||||||
}
|
}
|
||||||
lfs_ssize_t FS::GetFSSize(){
|
lfs_ssize_t FS::GetFSSize() {
|
||||||
return lfs_fs_size(&lfs);
|
return lfs_fs_size(&lfs);
|
||||||
}
|
}
|
||||||
// Delete directory and all files inside
|
// Delete directory and all files inside
|
||||||
|
|
|
@ -10,14 +10,9 @@ namespace Pinetime {
|
||||||
public:
|
public:
|
||||||
FS(Pinetime::Drivers::SpiNorFlash&);
|
FS(Pinetime::Drivers::SpiNorFlash&);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
void LVGLFileSystemInit();
|
void LVGLFileSystemInit();
|
||||||
|
|
||||||
void Mount();
|
|
||||||
void UnMount();
|
|
||||||
|
|
||||||
int FileOpen(lfs_file_t* file_p, const char* fileName, const int flags);
|
int FileOpen(lfs_file_t* file_p, const char* fileName, const int flags);
|
||||||
int FileClose(lfs_file_t* file_p);
|
int FileClose(lfs_file_t* file_p);
|
||||||
int FileRead(lfs_file_t* file_p, uint8_t* buff, uint32_t size);
|
int FileRead(lfs_file_t* file_p, uint8_t* buff, uint32_t size);
|
||||||
|
@ -35,8 +30,13 @@ namespace Pinetime {
|
||||||
lfs_ssize_t GetFSSize();
|
lfs_ssize_t GetFSSize();
|
||||||
int Stat(const char* path, lfs_info* info);
|
int Stat(const char* path, lfs_info* info);
|
||||||
void VerifyResource();
|
void VerifyResource();
|
||||||
static size_t getSize(){return size;}
|
static size_t getSize() {
|
||||||
static size_t getBlockSize(){return blockSize;}
|
return size;
|
||||||
|
}
|
||||||
|
static size_t getBlockSize() {
|
||||||
|
return blockSize;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Pinetime::Drivers::SpiNorFlash& flashDriver;
|
Pinetime::Drivers::SpiNorFlash& flashDriver;
|
||||||
|
|
||||||
|
@ -66,7 +66,6 @@ namespace Pinetime {
|
||||||
static constexpr size_t size = 0x34C000;
|
static constexpr size_t size = 0x34C000;
|
||||||
static constexpr size_t blockSize = 4096;
|
static constexpr size_t blockSize = 4096;
|
||||||
|
|
||||||
|
|
||||||
bool resourcesValid = false;
|
bool resourcesValid = false;
|
||||||
const struct lfs_config lfsConfig;
|
const struct lfs_config lfsConfig;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue