Port fat_io_lib, mount atasd0mp1 as sys:

This commit is contained in:
2025-11-19 15:50:00 +01:00
parent 5d77974586
commit 0cc78a7247
35 changed files with 7071 additions and 7 deletions

View File

@ -6,6 +6,7 @@
#include <stdbool.h>
#include "spinlock/spinlock.h"
#include "fs/portlfs/portlfs.h"
#include "fs/portfatfs/portfatfs.h"
#include "storedev/storedev.h"
#include "sysdefs/fs.h"
#include "compiler/attr.h"
@ -15,10 +16,14 @@
enum {
VFS_LITTLEFS,
VFS_FAT16,
VFS_FAT32,
};
UNUSED static const char *vfs_strings[] = {
"Little FS",
"FAT16",
"FAT32",
};
enum {
@ -34,7 +39,6 @@ typedef struct VfsObj {
SpinLock spinlock;
char path[VFS_MOUNTPOINT_LABEL_MAX+1+VFS_PATH_MAX];
void *extra;
size_t extrasize;
struct VfsMountPoint *vmp;
int32_t flags;
int32_t (*read)(struct VfsObj *vobj, uint8_t *const buffer, size_t n, size_t off);
@ -65,6 +69,7 @@ typedef struct VfsMountPoint {
union {
LittleFs littlefs;
FatFs fatfs;
} fs;
SpinLock spinlock;
} VfsMountPoint;