Switch from GPLv2 to GPLv2+
[fw/altos] / src / drivers / ao_fat.h
index 40786990209fb7318013133286a2ec61a4299f40..39f4207bb1dc6e418a02769918b4c1c06bf75c2d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -48,6 +49,7 @@ ao_fat_init(void);
 #define AO_FAT_EMFILE                  24
 #define AO_FAT_EFBIG                   27
 #define AO_FAT_ENOSPC                  28
+#define AO_FAT_EDIREOF                 29
 
 /* ao_fat_setup return values */
 #define AO_FAT_FILESYSTEM_SUCCESS                      0
@@ -63,6 +65,9 @@ ao_fat_init(void);
 void
 ao_fat_sync(void);
 
+void
+ao_fat_unmount(void);
+
 int8_t
 ao_fat_full(void);
 
@@ -77,20 +82,20 @@ int8_t
 ao_fat_creat(char name[11]);
 
 int8_t
-ao_fat_close(void);
+ao_fat_close(int8_t fd);
 
 int
-ao_fat_read(void *dest, int len);
+ao_fat_read(int8_t fd, void *dest, int len);
 
 int
-ao_fat_write(void *src, int len);
+ao_fat_write(int8_t fd, void *src, int len);
 
 #define AO_FAT_SEEK_SET        0
 #define AO_FAT_SEEK_CUR        1
 #define AO_FAT_SEEK_END        2
 
 int32_t
-ao_fat_seek(int32_t pos, uint8_t whence);
+ao_fat_seek(int8_t fd, int32_t pos, uint8_t whence);
 
 int8_t
 ao_fat_unlink(char name[11]);