fatfs相关宏定义说明

本文介绍了fat16、fat32和exfat文件系统的DBR(引导记录)结构,包括它们共有的字段以及exfat特有的部分。还讨论了fat16和fat32中的短文件名和长文件名条目,强调长文件名如何由短文件名条目和多个长文件名条目组成。此外,提到了exfat的卷目录条、蔟位图目录条、大写字符文件目录条以及用户文件目录条。最后,简要提及了MBR和PTE结构。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

fat16文件系统DBR
在这里插入图片描述
宏定义如下:

#define BS_JmpBoot			0		//跳转指令。3字节。/* x86 jump instruction (3-byte) */
#define BS_OEMName			3		//OEM名称。8字节。/* OEM name (8-byte) */
#define BPB_BytsPerSec		11		//扇区字节数。2字节。/* Sector size [byte] (WORD) */
#define BPB_SecPerClus		13		//每蔟扇区数。1字节。/* Cluster size [sector] (BYTE) */
#define BPB_RsvdSecCnt		14		//保留扇区数。2字节。/* Size of reserved area [sector] (WORD) */
#define BPB_NumFATs			16		//FAT表个数。1字节。/* Number of FATs (BYTE) */
#define BPB_RootEntCnt		17		//FAT32必须为0,FAT12/16为fat表中根目录区域大小。2字节。/* Size of root directory area for FAT [entry] (WORD) */
#define BPB_TotSec16		19		//FAT32必须为0,FAT12/16为卷大小。2字节。/* Volume size (16-bit) [sector] (WORD) */
#define BPB_Media			21		//介质描述符。1字节。/* Media descriptor byte (BYTE) */
#define BPB_FATSz16			22		//FAT32必须为0,FAT12/16为fat表占用的扇区数。2字节。/* FAT size (16-bit) [sector] (WORD) */
#define BPB_SecPerTrk		24		//每磁道扇区数。2字节。/* Number of sectors per track for int13h [sector] (WORD) */
#define BPB_NumHeads		26		//磁头数。2字节。/* Number of heads for int13h (WORD) */
#define BPB_HiddSec			28	//隐藏扇区数,卷在磁盘中的偏移量,用扇区个数表示。/* Volume offset from top of the drive (DWORD) */
#define BPB_TotSec32		32		//总扇区数,单位为扇区。/* Volume size (32-bit) [sector] (DWORD) */
#define BS_DrvNum			36		//BIOS驱动器号/* Physical drive number for int13h (BYTE) */
#define BS_NTres			37		//win nt错误标志。/* WindowsNT error flag (BYTE) */
#define BS_BootSig			38		//扩展引导标志。/* Extended boot signature (BYTE) */
#define BS_VolID			39		//卷序列号。/* Volume serial number (DWORD) */
#define BS_VolLab			43		//卷标。/* Volume label string (8-byte) */
#define BS_FilSysType		54		//文件系统类型字符串。/* Filesystem type string (8-byte) */
#define BS_BootCode			62		//启动代码。448字节。/* Boot code (448-byte) */
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值