📄 sdio_protocol.h
字号:
/*
DaVinci ARM Evaluation Software
(c)Texas Instruments 2004
*/
/** \defgroup SDIO SDIO Protocol module*/
/*@{*/
/** \file sdio_protocol.h
\brief SDIO Related header, which is protocol specific
\note Also refer to Davinci Register Manual & SDIO Specification Version 1.0, for details
*/
#ifndef _SDIO_PROTOCOL_H_
#define _SDIO_PROTOCOL_H_
/* SDIO Specific Commands & Expected Responses */
#define SDIO_INIT (MMCSD_CMD5|MMCSD_RSP4|MMCSD_BSYEXP)
#define SDIO_RW_DIRECT (MMCSD_CMD52|MMCSD_RSP5)
#define SDIO_RW_EXTENDED (MMCSD_CMD53|MMCSD_RSP5)
/* SDIO interface registers settings & bit patterns */
#define SDIO_RDWTCR 1
#define SDIO_RDWTRQ 1
#define SDIO_INT_ENABLE 0x0003
#define SDIO_CCCR_IO_ABORT 0x06
#define SDIO_CCCR_BUSIF_CTL 0x07
#define SDIO_RESET 0x08
#define SDIO_MBIO 0x01
#define SDIO_FN0_LSB 0x10
#define SDIO_FN0_MSB 0x11
#define SDIO_CCCR_CARD_CAPABILITY 0x08
#define SDIO_CCCR_FS 0x0D
#define SDIO_CCCR_BUSSUSPEND 0x0C
#define SDIO_CCCR_IEN 0x04
/* Function Prototypes */
STATUS SDIO_sendInitCommand(Uint32 voltageWindow, Uint32 opTimeOut);
STATUS SDIO_goIdleState(void);
STATUS SDIO_readDirect(Uint8* data, Uint32 fnNumber, Uint32 regAddress);
STATUS SDIO_writeDirect(Uint8 data, Uint16 rawFlag, Uint32 fnNumber, Uint32 regAddress);
STATUS SDIO_readExtended(Uint16 blockFlag, Uint16 locationFlag, Uint32 regAddress, Uint16 count, Uint16 fnNumber, Uint32* buffer,
Uint32 blkLength, DM_BOOL dmaEnable, Uint32 endian, Uint16 openLoopFlag,Uint32 cardMemAddr);
STATUS SDIO_writeExtended(Uint16 blockFlag, Uint16 locationFlag, Uint32 regAddress, Uint16 count, Uint16 fnNumber, Uint32* buffer,
Uint32 blkLength, DM_BOOL dmaEnable, Uint32 endian, Uint16 openLoopFlag,Uint32 cardMemAddr);
STATUS SDIO_setBlockSize(Uint16 fnNumber, Uint32 blockSize);
STATUS SDIO_stopTransmission(Uint32 fnNumber);
STATUS SDIO_setBusWidth(Uint16 busWidth);
STATUS SDIO_intEnable(void);
STATUS SDIO_readCSAData(int count, Uint32 fnNumber, Uint32 address, Uint32* buffer,Uint32 cardMemAddr);
STATUS SDIO_writeCSAData(int count, Uint32 fnNumber, Uint32 address, Uint32* buffer,Uint32 cardMemAddr);
STATUS SDIO_suspendFn(Uint32 fnNumber);
STATUS SDIO_resumeFn(Uint32 fnNumber);
#endif /* _SDIO_PROTOCOL_H_ */
/* Rev.No. Date/Time ECN No. Modifier */
/* ------- --------- ------- -------- */
/* 1 24 Jun 2004 14:41:01 1864 xjarlika */
/* */
/* Checking in MMCSD drv include and src files */
/********************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -