Implemented creating, removing and writing to files
This commit is contained in:
@@ -5,15 +5,12 @@
|
||||
#include "fatfs.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
typedef struct {
|
||||
// Block and size are in blocks of 128
|
||||
uint8_t user;
|
||||
char name[8];
|
||||
char ext[3];
|
||||
uint32_t size;
|
||||
uint16_t allocation[8];
|
||||
char* filename;
|
||||
} DiskEntry;
|
||||
struct DirtyBlock {
|
||||
uint32_t block;
|
||||
struct DirtyBlock* next;
|
||||
uint8_t size;
|
||||
uint8_t* data;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
FATFS *fs;
|
||||
@@ -25,6 +22,7 @@ typedef struct {
|
||||
uint8_t* buffer;
|
||||
uint8_t* directory;
|
||||
unsigned int size;
|
||||
struct DirtyBlock* dirty_block;
|
||||
} Storage;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user