sdhcide.h
来自「ssd192Xv1 液晶驱动程序 驱动程序 彩屏液晶」· C头文件 代码 · 共 30 行
H
30 行
#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 + =
减小字号Ctrl + -
显示快捷键?