diff --git a/source/fatfile.c b/source/fatfile.c index cbceec8..dcd10b1 100644 --- a/source/fatfile.c +++ b/source/fatfile.c @@ -340,34 +340,6 @@ int _FAT_close_r (struct _reent *r, int fd) { return ret; } -sec_t _FAT_Num_Sectors_To_Cache(CACHE* cache, FILE_POSITION position,PARTITION* partition) { - uint32_t limit; - uint32_t ra_start, ra_end, ra_sectors; - - - limit = cache->sectorsPerPage; - - ra_start = position.cluster; - ra_sectors = - position.sector; - - while (true) { - ra_end = ra_start; - ra_start = _FAT_fat_nextCluster(partition, ra_end); - - if (ra_start != ra_end + 1) - break; - - ra_sectors += partition->sectorsPerCluster; - - if (ra_sectors >= limit) - break; - } - if (ra_sectors > limit) ra_sectors = limit; - - return ra_sectors; - -} - ssize_t _FAT_read_r (struct _reent *r, int fd, char *ptr, size_t len) { FILE_STRUCT* file = (FILE_STRUCT*) fd; PARTITION* partition;