Write works
This commit is contained in:
@@ -107,7 +107,9 @@ int FS::DirCreate(const char* path) {
|
||||
int FS::Stat(const char* path, lfs_info* info) {
|
||||
return lfs_stat(&lfs, path, info);
|
||||
}
|
||||
|
||||
lfs_ssize_t FS::GetFSSize(){
|
||||
return lfs_fs_size(&lfs);
|
||||
}
|
||||
// Delete directory and all files inside
|
||||
int FS::DirDelete(const char* path) {
|
||||
|
||||
|
@@ -10,6 +10,8 @@ namespace Pinetime {
|
||||
public:
|
||||
FS(Pinetime::Drivers::SpiNorFlash&);
|
||||
|
||||
|
||||
|
||||
void Init();
|
||||
void LVGLFileSystemInit();
|
||||
|
||||
@@ -30,10 +32,11 @@ namespace Pinetime {
|
||||
int DirRewind(lfs_dir_t* dir);
|
||||
int DirCreate(const char* path);
|
||||
int DirDelete(const char* path);
|
||||
|
||||
lfs_ssize_t GetFSSize();
|
||||
int Stat(const char* path, lfs_info* info);
|
||||
void VerifyResource();
|
||||
|
||||
static size_t getSize(){return size;}
|
||||
static size_t getBlockSize(){return blockSize;}
|
||||
private:
|
||||
Pinetime::Drivers::SpiNorFlash& flashDriver;
|
||||
|
||||
@@ -62,6 +65,7 @@ namespace Pinetime {
|
||||
static constexpr size_t startAddress = 0x0B4000;
|
||||
static constexpr size_t size = 0x34C000;
|
||||
static constexpr size_t blockSize = 4096;
|
||||
|
||||
|
||||
bool resourcesValid = false;
|
||||
const struct lfs_config lfsConfig;
|
||||
|
Reference in New Issue
Block a user