diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/fat.c | 5 | ||||
-rw-r--r-- | firmware/drivers/fat.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 7fe011c863..78d0f8ff44 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c | |||
@@ -218,6 +218,11 @@ static int first_sector_of_cluster(int cluster) | |||
218 | return (cluster - 2) * fat_bpb.bpb_secperclus + fat_bpb.firstdatasector; | 218 | return (cluster - 2) * fat_bpb.bpb_secperclus + fat_bpb.firstdatasector; |
219 | } | 219 | } |
220 | 220 | ||
221 | int fat_startsector(void) | ||
222 | { | ||
223 | return fat_bpb.startsector; | ||
224 | } | ||
225 | |||
221 | int fat_mount(int startsector) | 226 | int fat_mount(int startsector) |
222 | { | 227 | { |
223 | unsigned char buf[SECTOR_SIZE]; | 228 | unsigned char buf[SECTOR_SIZE]; |
diff --git a/firmware/drivers/fat.h b/firmware/drivers/fat.h index 844864d88b..836d5c6866 100644 --- a/firmware/drivers/fat.h +++ b/firmware/drivers/fat.h | |||
@@ -66,6 +66,7 @@ extern int fat_mount(int startsector); | |||
66 | extern int fat_create_file(unsigned int currdir, char *name); | 66 | extern int fat_create_file(unsigned int currdir, char *name); |
67 | extern int fat_create_dir(unsigned int currdir, char *name); | 67 | extern int fat_create_dir(unsigned int currdir, char *name); |
68 | #endif | 68 | #endif |
69 | extern int fat_startsector(void); | ||
69 | extern int fat_open(unsigned int cluster, struct fat_file *ent); | 70 | extern int fat_open(unsigned int cluster, struct fat_file *ent); |
70 | extern int fat_read(struct fat_file *ent, int sectorcount, void* buf ); | 71 | extern int fat_read(struct fat_file *ent, int sectorcount, void* buf ); |
71 | extern int fat_seek(struct fat_file *ent, int sector ); | 72 | extern int fat_seek(struct fat_file *ent, int sector ); |