summaryrefslogtreecommitdiff
path: root/firmware/drivers/fat.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/fat.h')
-rw-r--r--firmware/drivers/fat.h44
1 files changed, 0 insertions, 44 deletions
diff --git a/firmware/drivers/fat.h b/firmware/drivers/fat.h
index 463910d52e..844864d88b 100644
--- a/firmware/drivers/fat.h
+++ b/firmware/drivers/fat.h
@@ -22,47 +22,6 @@
22 22
23#define SECTOR_SIZE 512 23#define SECTOR_SIZE 512
24 24
25struct bpb
26{
27 char bs_oemname[9]; /* OEM string, ending with \0 */
28 int bpb_bytspersec; /* Bytes per sectory, typically 512 */
29 int bpb_secperclus; /* Sectors per cluster */
30 int bpb_rsvdseccnt; /* Number of reserved sectors */
31 int bpb_numfats; /* Number of FAT structures, typically 2 */
32 int bpb_rootentcnt; /* Number of dir entries in the root */
33 int bpb_totsec16; /* Number of sectors on the volume (old 16-bit) */
34 int bpb_media; /* Media type (typically 0xf0 or 0xf8) */
35 int bpb_fatsz16; /* Number of used sectors per FAT structure */
36 int bpb_secpertrk; /* Number of sectors per track */
37 int bpb_numheads; /* Number of heads */
38 int bpb_hiddsec; /* Hidden sectors before the volume */
39 unsigned int bpb_totsec32; /* Number of sectors on the volume
40 (new 32-bit) */
41 int last_word; /* 0xAA55 */
42
43 /**** FAT12/16 specific *****/
44 int bs_drvnum; /* Drive number */
45 int bs_bootsig; /* Is 0x29 if the following 3 fields are valid */
46 unsigned int bs_volid; /* Volume ID */
47 char bs_vollab[12]; /* Volume label, 11 chars plus \0 */
48 char bs_filsystype[9]; /* File system type, 8 chars plus \0 */
49
50 /**** FAT32 specific *****/
51 int bpb_fatsz32;
52 int bpb_extflags;
53 int bpb_fsver;
54 int bpb_rootclus;
55 int bpb_fsinfo;
56 int bpb_bkbootsec;
57
58 /* variables for internal use */
59 int fatsize;
60 int totalsectors;
61 int rootdirsector;
62 int firstdatasector;
63 int startsector;
64};
65
66struct fat_direntry 25struct fat_direntry
67{ 26{
68 unsigned char name[256]; /* Name plus \0 */ 27 unsigned char name[256]; /* Name plus \0 */
@@ -101,9 +60,6 @@ struct fat_file
101 int sectornum; /* sector number in this cluster */ 60 int sectornum; /* sector number in this cluster */
102}; 61};
103 62
104/* global FAT info struct */
105extern struct bpb fat_bpb;
106
107extern int fat_mount(int startsector); 63extern int fat_mount(int startsector);
108 64
109#ifdef DISK_WRITE 65#ifdef DISK_WRITE