summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/fat.c5
-rw-r--r--firmware/drivers/fat.h1
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
221int fat_startsector(void)
222{
223 return fat_bpb.startsector;
224}
225
221int fat_mount(int startsector) 226int 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);
66extern int fat_create_file(unsigned int currdir, char *name); 66extern int fat_create_file(unsigned int currdir, char *name);
67extern int fat_create_dir(unsigned int currdir, char *name); 67extern int fat_create_dir(unsigned int currdir, char *name);
68#endif 68#endif
69extern int fat_startsector(void);
69extern int fat_open(unsigned int cluster, struct fat_file *ent); 70extern int fat_open(unsigned int cluster, struct fat_file *ent);
70extern int fat_read(struct fat_file *ent, int sectorcount, void* buf ); 71extern int fat_read(struct fat_file *ent, int sectorcount, void* buf );
71extern int fat_seek(struct fat_file *ent, int sector ); 72extern int fat_seek(struct fat_file *ent, int sector );