aboutsummaryrefslogtreecommitdiff
path: root/sdram-fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'sdram-fs.h')
-rw-r--r--sdram-fs.h23
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);