From 6c32e2df4c4b4ee70885fcd729e68bf25fdd8ada Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Tue, 21 Jun 2016 19:25:40 -0400 Subject: Generalize the sdram-based file system --- sdram-fs.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sdram-fs.h (limited to 'sdram-fs.h') diff --git a/sdram-fs.h b/sdram-fs.h new file mode 100644 index 0000000..6bab0bb --- /dev/null +++ b/sdram-fs.h @@ -0,0 +1,23 @@ +#include +#include + +/* alignment for file allocations */ +#define SDFS_ALIGN 16 + +/* maximum length of file name */ +#define SDFS_NAMELEN 32 + +typedef struct { + char name[SDFS_NAMELEN]; + uint8_t *loc; + size_t len; +} filetab_t; + +extern int sdfs_init(void); +extern int sdfs_count(void); +extern filetab_t *sdfs_first(void); +extern filetab_t *sdfs_next(void); +extern int sdfs_open(unsigned char *name); +extern int sdfs_write(unsigned char *buf, int len); +extern int sdfs_close(void); +extern int sdfs_cancel(void); -- cgit v1.2.3