FAT32使用总结,基于Sanddisk 32GB microSD

capacity=0x732480000,
SDMMC_BLOCK_SIZE=0x200

nFats=0x2,
secPerClust=0x20,
totalSec=0x398d66d,
nBlocks=0x398d66d
fatStartSec=nReservedSecs;
dataStartSec=0x8000,
nReservedSecs=0xcf4,
nHiddenSecs=0x2000

secPerFat=14726,
secPerClust=32,
totalSec=60348013,
dataStartSec=32768,
nBlocks=60348013,
blockSize=512,
nFats=2,
nFatEnts=1884853,
secSizeShift=9,
dataStartSec = nReservedSecs +(secPerFat *nFats);
nFatEnts = (((totalSec - dataStartSec) /secPerClust) + DOS_MIN_CLUST);
还是?
nFatEnts=secPerFat*blockSize/32

phycal sectorNo.=fatSecNo.+nHiddenSecs;

groupAllocStart = dosfsDiskToHost32 (&fsinfoBuf[4]);

dosFatDesc.rawEntryRead = fat32RawEntRead;
dosFatDesc.rawEntryWrite = fat32RawEntWrite;
dosFatDesc.fatEntryRead = fat32EntRead;
dosFatDesc.fatEntryWrite = fat32EntWrite;
dosFatDesc.cleanBitMask = 0x08000000;
dos_fat_reserv = 0x0ffffff0;
dos_fat_bad = 0x0ffffff7;
dos_fat_eof = 0x0fffffff;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值