Finished first disk emulation implementation
This commit is contained in:
@@ -5,28 +5,16 @@
|
||||
#include "fatfs.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
enum Type {
|
||||
TYPE_NONE,
|
||||
TYPE_FILE,
|
||||
TYPE_DIR
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
// Block and size are in blocks of 128
|
||||
uint32_t start;
|
||||
uint32_t size;
|
||||
char* filename;
|
||||
uint8_t user;
|
||||
char name[8];
|
||||
char ext[3];
|
||||
uint32_t size;
|
||||
uint16_t allocation[8];
|
||||
char* filename;
|
||||
} DiskEntry;
|
||||
|
||||
typedef struct {
|
||||
uint8_t entry_count;
|
||||
uint8_t current;
|
||||
DiskEntry entries[127];
|
||||
uint32_t end;
|
||||
} Disk;
|
||||
|
||||
typedef struct {
|
||||
FATFS *fs;
|
||||
FIL *file;
|
||||
@@ -34,11 +22,8 @@ typedef struct {
|
||||
uint8_t ready;
|
||||
uint32_t counter;
|
||||
uint32_t lba;
|
||||
uint32_t offset;
|
||||
uint8_t* buffer;
|
||||
unsigned int size;
|
||||
enum Type type;
|
||||
Disk A;
|
||||
} Storage;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#define _USE_EXPAND 0
|
||||
/* This option switches f_expand function. (0:Disable or 1:Enable) */
|
||||
|
||||
#define _USE_CHMOD 0
|
||||
#define _USE_CHMOD 1
|
||||
/* This option switches attribute manipulation functions, f_chmod() and f_utime().
|
||||
/ (0:Disable or 1:Enable) Also _FS_READONLY needs to be 0 to enable this option. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user