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

📄 sd_protocol.h

📁 TI的DM6446的硬件平台搭建的相关例子
💻 H
字号:
/*
    DaVinci Evaluation Software

    (c)Texas Instruments 2004
*/

/** \defgroup SD SD Protocol module*/
/*@{*/

/** \file  sd_protocol.h
     \brief SD Related header, which is protocol specific

*/

#ifndef _SD_PROTOCOL_H_
#define _SD_PROTOCOL_H_

/* Commands and their responses */
/* SD */
#define SD_SEND_RELATIVE_ADDR      (MMCSD_CMD3 | MMCSD_RSP6 | MMCSD_PPLEN)
#define SD_ERASE_WR_BLK_START      (MMCSD_CMD32 | MMCSD_RSP1 | MMCSD_PPLEN)
#define SD_ERASE_BLK_END           (MMCSD_CMD33 | MMCSD_RSP1 | MMCSD_PPLEN)
#define SD_ERASE                   (MMCSD_CMD38 | MMCSD_RSP1 | MMCSD_BSYEXP | MMCSD_PPLEN)
#define SD_LOCK_UNLOCK             (MMCSD_CMD42 | MMCSD_RSP1 | MMCSD_PPLEN)
#define SD_GEN_CMD                 (MMCSD_CMD56 | MMCSD_RSP1 | MMCSD_PPLEN)

/* Following commands have to be preceeded with APP_CMD ( CMD55 ) */
#define SD_SET_BUS_WIDTH           (MMCSD_CMD6  | MMCSD_RSP1 | MMCSD_PPLEN)
#define SD_SD_STATUS               (MMCSD_CMD13 | MMCSD_RSP1 | MMCSD_PPLEN)
#define SD_SEND_NUM_WR_BLKS        (MMCSD_CMD22 | MMCSD_RSP1 | MMCSD_PPLEN)
#define SD_SET_WR_BLK_ERASE_CNT    (MMCSD_CMD23 | MMCSD_RSP1 | MMCSD_PPLEN)
#define SD_APP_OP_COND             (MMCSD_CMD41 | MMCSD_RSP3 )
#define SD_SET_CLR_CARD_DETECT     (MMCSD_CMD42 | MMCSD_RSP1 | MMCSD_PPLEN)
#define SD_SEND_SCR                (MMCSD_CMD51 | MMCSD_RSP1 | MMCSD_PPLEN)


/* Function Prototypes */
STATUS SD_sendOpCond( Uint32 voltageWindow, Uint32 opTimeOut );
STATUS SD_sendRCA( Uint32 *rcaRcvd );
STATUS SD_erase( Uint32 eraseStartAddr, Uint32 eraseEndAddr );
STATUS SD_setPassword( Uint8 oldPasswordSize, Uint8 newPasswordSize, Uint8 *oldPassword, Uint8 *newPassword,Uint32 cardMemAddr );
STATUS SD_resetPassword( Uint8 currentPasswordSize, Uint8 *currentPassword,Uint32 cardMemAddr );
Uint8 SD_cardLock( Uint8 cardLockMode, Uint8 oldPasswordSize, Uint8 newPasswordSize, Uint8 *oldPassword, Uint8 *newPassword,Uint32 cardMemAddr );
Uint8 SD_cardUnlock( Uint8 cardLockMode, Uint8 currentPasswordSize, Uint8 *currentPassword,Uint32 cardMemAddr );
Uint8 SD_forcedErase( Uint32 cardMemAddr );
STATUS SD_genCmd( Bool read, Uint16 *data, Uint32 numWords,Uint32 cardMemAddr );
/* ACMD Commands */
STATUS SD_setBusWidth( Uint32 rca, Uint8 busWidth, Uint32 opTimeOut );
STATUS SD_readSDStatus( Uint32 rca, Uint16 *sdStatus,Uint32 cardMemAddr );
STATUS SD_sendNumWrBlks( Uint32 rca, Uint32 *numWrBlks,Uint32 cardMemAddr );
STATUS SD_setWrBlkEraseCnt( Uint32 rca, Uint16 numBlksToPreErase );
STATUS SD_setClrCardDetect( Uint32 rca, Uint8 setSD );
STATUS SD_sendSCR( Uint32 rca, Uint16 *scr,Uint32 cardMemAddr );
STATUS SD_cardDetect(Uint32 rca);

#endif /* _SD_PROTOCOL_H_ */

/*@}*/

/* Rev.No.   Date/Time               ECN No.          Modifier      */
/* -------   ---------               -------          --------      */

/* 1         24 Jun 2004 14:41:02    1864             xjarlika      */
/*                                                                  */
/* Checking in MMCSD drv include and src files                      */
/********************************************************************/
/* Rev.No.   Date/Time               ECN No.          Modifier      */
/* -------   ---------               -------          --------      */

/* 2         24 Aug 2004 14:45:32    2401             xjarlika      */
/*                                                                  */
/* Updating MMCSD drv include and src files after testing on Hibari */
/********************************************************************/

⌨️ 快捷键说明

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