mmcapi.h

来自「老外的一个开源项目」· C头文件 代码 · 共 52 行

H
52
字号
// Copyright (c) David Vescovi.  All rights reserved.
// Part of Project DrumStix
// Windows Embedded Developers Interest Group (WE-DIG) community project.
// http://www.we-dig.org
// Copyright (c) Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------------------------
//
//  File: mmcapi.h
//
//  This file contains definitions specific to the MMC API.
//
//
//------------------------------------------------------------------------------
#ifndef __MMCAPI_H__
#define __MMCAPI_H__


#ifdef __cplusplus
extern "C" {
#endif

#include "bsp.h"

// Drive geometry structure
typedef struct drv_geometry_desc
{
	UINT32	totalLBA;			// Total drive logical blocks
	UINT16	dfltCyl;			// Number of cylinders
	UINT16	dfltHd;				// Number of Heads
	UINT16	dfltSct;			// Sectors per track
	UINT16	dfltBytesPerSect;	// Bytes per sector
	UCHAR	serialNum[16];		// Drive serial	number in ASCII	mode
	UCHAR	modelNum[32];		// Drive model number in ASCII mode
} DRV_GEOMETRY_DESC, *PDRV_GEOMETRY_DESC;

BOOL mmc_init(void);
BOOL mmc_drive_open(void);
BOOL mmc_drive_close(void);
BOOL mmc_read_serial(PDRV_GEOMETRY_DESC idDrvPtr);
BOOL mmc_read(ULONG sector, USHORT count, UCHAR *buffer);
BOOL mmc_write(ULONG sector, UCHAR *buffer, USHORT count);
BOOL mmc_erase(ULONG sector, USHORT count);

#ifdef __cplusplus
}
#endif

#endif



⌨️ 快捷键说明

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