⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdhcide.h

📁 ssd192Xv1 液晶驱动程序 驱动程序 彩屏液晶
💻 H
字号:
#ifndef __SDHCIDE_H__
#define __SDHCIDE_H__

#include "endian.h"

// IDE decode routines
#pragma pack(1)
typedef struct tagPTE_T
{
	unsigned char	boot_indicator;		// 0x00 or 0x80 (boot media)
	unsigned char	start_head;		// starting head
	unsigned short	start_sector_cyl;	// starting sector & cyl
	unsigned char	system_id;		// 0 < 0x01 < 32680 sectors < 0x04 < 65536 < 0x06 -
	unsigned char	end_head;		// ending head
	unsigned short	end_sector_cyl;		// ending sector & cyl
	unsigned long	rel_sector;		// offset (sectors) to the start of the current partition
	unsigned long	total_sector;		// number of sectors in the partition
} PTE_T;

typedef struct tagMBR_T
{
	unsigned char	rsvd[446];
	PTE_T	pte[4];
	unsigned short	signature;
} MBR_T;

#pragma pack()

#define PTE_SECTOR(x)	((x) & 0x003F)		// sector bits are b5..b0
#define PTE_CYLINDER(x)	(((x) >> 6) & 0xffC0)	// cyl bits are b15..b6

// api calls
void decode_pte (PTE_T *pte);
#endif
/* end */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -