- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Functions
csl_mmcsd.c File Reference

MMCSD functional layer API definition file. More...

`#include <csl_mmcsd.h>`
`#include <csl_intc.h>`

## Functions
CSL_Status | MMC_checkReadDmaDone (void *hMmcSd)
CSL_Status | MMC_init (void)
CSL_MmcsdHandle | MMC_open (CSL_MMCControllerObj *pMmcsdContObj, CSL_MmcsdInstId instId, CSL_MMCSDOpMode opMode, CSL_Status *status)
CSL_Status | MMC_close (CSL_MmcsdHandle hMmcsd)
CSL_Status | MMC_setCardType (CSL_MMCCardObj *pCardObj, CSL_CardType cardType)
CSL_Status | MMC_setCardPtr (CSL_MmcsdHandle hMmcsd, CSL_MMCCardObj *pMmcCardObj)
CSL_Status | MMC_setCallBack (CSL_MmcsdHandle hMmcsd, CSL_MMCCallBackObj *pFunction)
CSL_Status | MMC_getNumberOfCards (CSL_MmcsdHandle hMmcsd, Uint16 *pActiveNoCard)
CSL_Status | MMC_clearResponse (CSL_MmcsdHandle hMmcsd)
CSL_Status | MMC_ierEnable (CSL_MmcsdHandle hMmcsd)
CSL_Status | MMC_ierDisable (CSL_MmcsdHandle hMmcsd)
CSL_Status | MMC_intEnable (CSL_MmcsdHandle hMmcsd, Uint16 maskValue)
CSL_Status | MMC_eventEnable (CSL_MmcsdHandle hMmcsd, CSL_MMCSDEventType mmcsdEvent)
CSL_Status | MMC_eventDisable (CSL_MmcsdHandle hMmcsd, CSL_MMCSDEventType mmcsdEvent)
Bool | MMC_drrdy (CSL_MmcsdHandle hMmcsd, CSL_Status *pStatus)
Bool | MMC_dxrdy (CSL_MmcsdHandle hMmcsd, CSL_Status *pStatus)
CSL_Status | MMC_saveStatus (CSL_MmcsdHandle hMmcsd)
Uint32 | MMC_getStatus (CSL_MmcsdHandle hMmcsd, Uint32 maskValue, CSL_Status *pStatus)
CSL_Status | MMC_setupNative (CSL_MmcsdHandle hMmcsd, CSL_MMCSetupNative *pMmcInit)
CSL_Status | MMC_config (CSL_MmcsdHandle hMmcsd, CSL_MMCConfig *pMmcConfig)
CSL_Status | MMC_getConfig (CSL_MmcsdHandle hMmcsd, CSL_MMCConfig *pMmcConfig)
CSL_Status | MMC_sendCmd (CSL_MmcsdHandle hMmcsd, Uint32 cmd, Uint32 arg, Uint16 waitForRsp)
CSL_Status | MMC_sendGoIdle (CSL_MmcsdHandle hMmcsd)
CSL_Status | MMC_stop (CSL_MmcsdHandle hMmcsd)
CSL_Status | MMC_deselectCard (CSL_MmcsdHandle hMmcsd, CSL_MMCCardObj *pMmcCardObj)
CSL_Status | MMC_selectCard (CSL_MmcsdHandle hMmcsd, CSL_MMCCardObj *pMmcCardObj)
CSL_Status | MMC_sendOpCond (CSL_MmcsdHandle hMmcsd, Uint16 clkDivValue)
CSL_Status | MMC_setRca (CSL_MmcsdHandle hMmcsd, CSL_MMCCardObj *pMmcCardObj, Uint16 rCardAddr)
CSL_Status | SD_sendRca (CSL_MmcsdHandle hMmcsd, CSL_MMCCardObj *pSdCardObj, Uint16 *pRCardAddr)
CSL_Status | MMC_sendAllCID (CSL_MmcsdHandle hMmcsd, CSL_MMCCardIdObj *pMmcCardIdObj)
CSL_Status | SD_sendAllCID (CSL_MmcsdHandle hMmcsd, CSL_MMCCardIdObj *pSdCardIdObj)
CSL_Status | MMC_getCardCsd (CSL_MmcsdHandle hMmcsd, CSL_MMCCardCsdObj *pMmcCardCsdObj)
CSL_Status | SD_getCardCsd (CSL_MmcsdHandle hMmcsd, CSL_MMCCardCsdObj *pSdCardCsdObj)
CSL_Status | MMC_read (CSL_MmcsdHandle hMmcsd, Uint32 cardAddr, Uint16 noOfBytes, Uint16 *pReadBuffer)
CSL_Status | MMC_write (CSL_MmcsdHandle hMmcsd, Uint32 cardAddr, Uint16 noOfBytes, Uint16 *pWriteBuffer)
CSL_Status | MMC_setDmaHandle (CSL_MmcsdHandle hMmcsd, CSL_DMA_Handle hDmaWrite, CSL_DMA_Handle hDmaRead)
CSL_Status | MMC_setDataTransferCallback (CSL_MmcsdHandle hMmcsd, CSL_MMCDataTxferCallBackPtr dataTransferCallback)
CSL_Status | MMC_setDmaChanConfig (CSL_MmcsdHandle hMmcsd, CSL_MmcsdDmaConfig dmaConfig)
CSL_Status | MMC_setEndianMode (CSL_MmcsdHandle hMmcsd, CSL_MmcsdEndianMode writeEndianMode, CSL_MmcsdEndianMode readEndianMode)
CSL_Status | MMC_setBlockLength (CSL_MmcsdHandle hMmcsd, Uint32 blockLen)
CSL_Status | MMC_setWriteBlkEraseCnt (CSL_MmcsdHandle hMmcsd, Uint32 blkCnt)
CSL_Status | SD_setBusWidth (CSL_MmcsdHandle hMmcsd, Uint8 busWidth)
CSL_Status | MMC_getCardStatus (CSL_MmcsdHandle hMmcsd, Uint32 *pCardStatus)
CSL_Status | SD_configurePullup (CSL_MmcsdHandle hMmcsd, Bool pullupCfg)

## Detailed Description

MMCSD functional layer API definition file.

Path: \(CSLPATH)/src

## Function Documentation

CSL_Status MMC_ierDisable | ( | CSL_MmcsdHandle | hMmcsd | ) |

===========================================================================
MMC_ierDisable

Description
This function will disable the interrupt for MMCSD via IER0.

Arguments

                hMmcsd            Handle to the MMCSD

Return Value CSL_Status

- CSL_SOK - successful
- CSL_ESYS_BADHANDLE - Invalid handle

Pre Condition
MMC_open() API should be called successfully before this.

Post Condition
Before enabling interrupt of any type make sure the isr function is plugged in ISR.

Modifies
Interrupt will be enable for particular event.

Example

    			CSL_MMCControllerObj  pMmcsdContObj;
                CSL_MmcsdHandle       hMmcsd;
                CSL_MmcsdInstId       instId;
                Uint16                maskValue;
                CSL_status            status;

                   instId = CSL_MMCSD0_INST;

                hMmcsd = MMC_open(&pMmcsdContObj, instId, CSL_MMCSD_OPMODE_POLLED,
                                  &status);

                status = MMC_ierDisable(hMmcsd);

===========================================================================

References CSL_MMCControllerObj::mmcRegs.

Referenced by MMC_read(), and MMC_write().

CSL_Status MMC_ierEnable | ( | CSL_MmcsdHandle | hMmcsd | ) |

===========================================================================
MMC_ierEnable

Description
This function will enable or the interrupt for MMCSD via IER0.

Arguments

                hMmcsd            Handle to the MMCSD

Return Value CSL_Status

- CSL_SOK - successful
- CSL_ESYS_BADHANDLE - Invalid handle

Pre Condition
MMC_open() API should be called successfully before this.

Post Condition
Before enabling interrupt of any type make sure the isr function is plugged in ISR.

Modifies
Interrupt will be enable for particular event.

Example

    			CSL_MMCControllerObj  pMmcsdContObj;
                CSL_MmcsdHandle       hMmcsd;
                CSL_MmcsdInstId       instId;
                Uint16                maskValue;
                CSL_status            status;

                   instId = CSL_MMCSD0_INST;

                hMmcsd = MMC_open(&pMmcsdContObj, instId, CSL_MMCSD_OPMODE_POLLED,
                                  &status);

                status = MMC_ierEnable(hMmcsd);

===========================================================================

References CSL_MMCControllerObj::mmcRegs.

Referenced by MMC_read(), and MMC_write().