2 * Copyright © 2013 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
24 #define AO_FAT_FILE_READ_ONLY 0x01
25 #define AO_FAT_FILE_HIDDEN 0x02
26 #define AO_FAT_FILE_SYSTEM 0x04
27 #define AO_FAT_FILE_VOLUME_LABEL 0x08
28 #define AO_FAT_FILE_DIRECTORY 0x10
29 #define AO_FAT_FILE_ARCHIVE 0x20
31 #define AO_FAT_DENT_EMPTY 0xe5
32 #define AO_FAT_DENT_END 0x00
35 ao_fat_open(char name[11]);
38 ao_fat_creat(char name[11]);
44 ao_fat_read(uint8_t *dest, int len);
47 ao_fat_write(uint8_t *buf, int len);
49 #define AO_FAT_SEEK_SET 0
50 #define AO_FAT_SEEK_CUR 1
51 #define AO_FAT_SEEK_END 2
54 bao_fat_seek(int32_t pos, uint8_t whence);
57 ao_fat_unlink(char name[11]);
60 ao_fat_rename(char old[11], char new[11]);
62 struct ao_fat_dirent {
71 ao_fat_readdir(uint16_t *entry, struct ao_fat_dirent *dirent);
73 #endif /* _AO_FAT_H_ */