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

📄 xsmmc.h

📁 优龙YLP270开发板 光盘自带的BIOS和实验例程源码 强烈推荐
💻 H
字号:
/******************************************************************************
**
**  COPYRIGHT (C) 2000, 2001 Intel Corporation.
**
**  This software as well as the software described in it is furnished under
**  license and may only be used or copied in accordance with the terms of the
**  license. The information in this file is furnished for informational use
**  only, is subject to change without notice, and should not be construed as
**  a commitment by Intel Corporation. Intel Corporation assumes no
**  responsibility or liability for any errors or inaccuracies that may appear
**  in this document or any software that may be provided in association with
**  this document.
**  Except as permitted by such license, no part of this document may be
**  reproduced, stored in a retrieval system, or transmitted in any form or by
**  any means without the express written consent of Intel Corporation.
**
**  FILENAME:   XcMmc.h
**
**  PURPOSE:    This file defines the API for the MMC driver
**
**  $Modtime: 7/17/03 1:01p $
**
******************************************************************************/

#ifndef _XSMMC_H     // Only include this header file once!
#define _XSMMC_H

/*
*******************************************************************************
*                            GLOBAL VARIABLES
*******************************************************************************
*/

#undef EXTERN
#ifdef XSMMC_GLOBALS
#define EXTERN
#else
#define EXTERN extern
#endif // XSMMC_GLOBALS

EXTERN union {
    UINT8 b[16];
    UINT16 db[8];
    struct {
        UINT ECC : 2;               // Bits 0-31
        UINT RES1 : 2;
        UINT TMP_WRITE_PROTECT : 1;
        UINT PERM_WRITE_PROTECT : 1;
        UINT COPY : 1;
        UINT RES2 : 1;
        UINT RES3 : 5;
        UINT WRITE_BL_PARTIAL : 1;
        UINT WRITE_BL_LEN : 4;
        UINT R2W_FACTOR : 3;
        UINT DEFAULT_ECC : 2;
        UINT WP_GRP_ENABLE : 1;
        UINT WP_GRP_SIZE : 5;
        UINT ERASE_GRP_MULT : 3;

        UINT ERASE_GRP_MULTx : 2;   // Bits 32-63
        UINT ERASE_GRP_SIZE : 5;
        UINT C_SIZE_MULT : 3;
        UINT VDD_W_CURR_MAX : 3;
        UINT VDD_W_CURR_MIN : 3;
        UINT VDD_R_CURR_MAX : 3;
        UINT VDD_R_CURR_MIN : 3;
        UINT C_SIZE : 10;

        UINT C_SIZEx : 2;           // Bits 64-95
        UINT RES4 : 2;
        UINT DSR_IMP : 1;
        UINT READ_BLK_MISALIGN : 1;
        UINT WRITE_BLK_MISALIGN : 1;
        UINT READ_BL_PARTIAL : 1;
        UINT READ_BL_LEN : 4;
        UINT CCC : 12;
        UINT TRAN_SPEED : 8;

        UINT NSAC : 8;              // Bits 96-127
        UINT TAAC : 8;
        UINT RES5 : 2;
        UINT SPEC_VERS : 4;
        UINT CSD_STRUCTURE : 2;
        UINT RES6 : 8;
    } CSD;
} XsMMC_CID, XsMMC_CSD;

EXTERN union {
    UINT8 b[6];
    UINT16 db[3];
} XsMMC_OCR;

#undef EXTERN

/*
*******************************************************************************
*                            FUNCTION PROTOTYPES
*******************************************************************************
*/

// Init MMC internal variables.
void XsMMCSWInit(void);

// Setup the MMC controller
ErrorT XsMMCHWSetup(void);

// Shutdown the MMC controller
ErrorT XsMMCHWShutdown(void);

// Put a 512 byte block to the MMC.
ErrorT XsMMCPut(UINT32 block, BYTE *buffer);

// Get a 512 byte block from the MMC.
ErrorT XsMMCGet(UINT32 block, BYTE *buffer);

#endif  // _XSMMC_H

⌨️ 快捷键说明

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