www.pudn.com > 外挂硬盘和FLASH的MP3方案程序下载.rar > FAT32READCLUSTER.C
#ifndef _FAT32_DEFINE
#include "FAT32.c"
#endif
void FAT32ReadCluster(DWORD *Cluster);
void FAT32ReadCluster(DWORD *Cluster)
{
if (FAT32.ClusSecCnt==FAT32.SecPerClus) //读下一簇
{
*Cluster=FAT32NextCluster(*Cluster);
IDEReadSector(ClusterToSector(*Cluster));
FAT32.ClusSecCnt=1;
}
else if (FAT32.ClusSecCnt==0) //读第一簇
{
IDEReadSector(ClusterToSector(*Cluster));
FAT32.ClusSecCnt++;
}
else //读当前簇下一扇区
{
IDEReadSector(IDE.CurrentSector+1);
FAT32.ClusSecCnt++;
}
}