summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/fat.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/export/fat.h b/firmware/export/fat.h
index 2680fdf751..93b60e6dc0 100644
--- a/firmware/export/fat.h
+++ b/firmware/export/fat.h
@@ -73,13 +73,19 @@ struct fat_file
73#endif 73#endif
74}; 74};
75 75
76#define FAT_DIR_BUFSECTORS 2 /* Needs to be an even number, at least 2 */
77#define FAT_DIR_BUFSIZE (SECTOR_SIZE*FAT_DIR_BUFSECTORS)
78
76struct fat_dir 79struct fat_dir
77{ 80{
78 unsigned int entry; 81 unsigned int entry;
79 unsigned int entrycount; 82 unsigned int entrycount;
80 long sector; 83 long sector;
81 struct fat_file file; 84 struct fat_file file;
82 unsigned char sectorcache[3][SECTOR_SIZE]; 85 /* The buffer needs to be at least 3 sectors, so we make it 2*2 and
86 alternate between them */
87 unsigned char sectorcache[2][FAT_DIR_BUFSIZE];
88 unsigned int bufindex; /* Which buffer to be loaded next */
83}; 89};
84 90
85 91