diff options
author | Paul Selkirk <paul@psgd.org> | 2016-06-21 19:25:40 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2016-06-21 19:25:40 -0400 |
commit | 6c32e2df4c4b4ee70885fcd729e68bf25fdd8ada (patch) | |
tree | a48de5f5d6535199b2b3e25bd28f229ddc6f7973 /sdram-fs.h | |
parent | 035ad220df784f71e2424c86d5ffe015c764ae69 (diff) |
Generalize the sdram-based file systemekermit
Diffstat (limited to 'sdram-fs.h')
-rw-r--r-- | sdram-fs.h | 23 |
1 files changed, 23 insertions, 0 deletions
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 <stdint.h> +#include <stddef.h> + +/* 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); |