📄 csl_mmcsdaux.h
字号:
if (buffDescr.error)
break;
mmcsdRegs->MMCDXR = *buffDescr.buff++;
buffDescr.transfernum++;
}
*(CSL_MmcsdBufferDescriptor*)arg = buffDescr;
return;
}
/** ============================================================================
* @n@b CSL_mmcsdIntrEnable
*
* @b Description
* @n This function enables interrupts for the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdIntrEnable (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdIntrEnable (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd,
/* Arguments if any for the command */
void *arg
)
{
CSL_MmcsdRegsOvly mmcsdRegs;
mmcsdRegs = hMmcsd->regs;
mmcsdRegs->MMCIM = *(CSL_BitMask16*)arg;
}
/** ============================================================================
* @n@b CSL_mmcsdIntrDisable
*
* @b Description
* @n This function disables interrupts for the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdIntrDisable (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdIntrDisable (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd,
/* Arguments if any for the command */
void *arg
)
{
CSL_MmcsdRegsOvly mmcsdRegs;
mmcsdRegs = hMmcsd->regs;
mmcsdRegs->MMCIM &= ~(*(CSL_BitMask16 *)arg);
}
/** ============================================================================
* @n@b CSL_mmcsdSetAccessWidth
*
* @b Description
* @n This function sets the access width of the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdSetAccessWidth (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdSetAccessWidth (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd,
/* Arguments if any for the command */
void *arg
)
{
CSL_FINS (hMmcsd->regs->MMCFIFOCTL, MMCSD_MMCFIFOCTL_ACCWD,
*(CSL_MmcsdFifoAccessWidth*)arg);
}
/** ============================================================================
* @n@b CSL_mmcsdSetFifoThreshold
*
* @b Description
* @n This function sets the FIFO threshold value of the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdSetFifoThreshold (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdSetFifoThreshold (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd,
/* Arguments if any for the command */
void *arg
)
{
CSL_FINS (hMmcsd->regs->MMCFIFOCTL, MMCSD_MMCFIFOCTL_FIFOLEV,
*(CSL_MmcsdFifoThreshold*)arg);
}
/** ============================================================================
* @n@b CSL_mmcsdSetFifoDir
*
* @b Description
* @n This function sets the FIFO direction of the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdSetFifoDir (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdSetFifoDir (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd,
/* Arguments if any for the command */
void *arg
)
{
CSL_FINS (hMmcsd->regs->MMCFIFOCTL, MMCSD_MMCFIFOCTL_FIFODIR,
*(CSL_MmcsdFifoDir*)arg);
}
/** ============================================================================
* @n@b CSL_mmcsdResetFifo
*
* @b Description
* @n This function resets the FIFO of the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdResetFifo (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdResetFifo (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd
)
{
CSL_FINS (hMmcsd->regs->MMCFIFOCTL, MMCSD_MMCFIFOCTL_FIFORST,
CSL_MMCSD_MMCFIFOCTL_FIFORST_RESET );
}
/** ============================================================================
* @n@b CSL_mmcsdClearStatus
*
* @b Description
* @n This function clears the status bits of the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdClearStatus (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdClearStatus (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd
)
{
CSL_MmcsdRegsOvly mmcsdRegs;
mmcsdRegs = hMmcsd->regs;
mmcsdRegs->MMCST0 = 0;
mmcsdRegs->MMCST1 = 0;
}
/** ============================================================================
* @n@b CSL_mmcsdClearResponse
*
* @b Description
* @n This function clears the response bits of the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdClearResponse (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdClearResponse (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd
)
{
CSL_MmcsdRegsOvly mmcsdRegs;
mmcsdRegs = hMmcsd->regs;
mmcsdRegs->MMCCIDX = 0;
mmcsdRegs->MMCRSP01 = 0;
mmcsdRegs->MMCRSP23 = 0;
mmcsdRegs->MMCRSP45 = 0;
mmcsdRegs->MMCRSP67 = 0;
}
/** ============================================================================
* @n@b CSL_mmcsdSdioEnableRdwtCrc
*
* @b Description
* @n This function enables the Read/Write control of the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdSdioEnableRdwtCrc (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdSdioEnableRdwtCrc (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd
)
{
CSL_FINS (hMmcsd->regs->SDIOCTL, MMCSD_SDIOCTL_RDWTCR, 1);
}
/** ============================================================================
* @n@b CSL_mmcsdSdioStartRdwt
*
* @b Description
* @n This function starts the Read/Write control of the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdSdioStartRdwt (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdSdioStartRdwt (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd
)
{
CSL_FINS (hMmcsd->regs->SDIOCTL, MMCSD_SDIOCTL_RDWTRQ, 1);
}
/** ============================================================================
* @n@b CSL_mmcsdSdioEndRdwt
*
* @b Description
* @n This function ends the read/write of the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdSdioEndRdwt (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdSdioEndRdwt (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd
)
{
CSL_FINS (hMmcsd->regs->SDIOCTL, MMCSD_SDIOCTL_RDWTRQ, 0);
}
/** ============================================================================
* @n@b CSL_mmcsdSdioIntrEnable
*
* @b Description
* @n This function enables SDIO interrupts MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdSdioIntrEnable (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdSdioIntrEnable (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd,
/* Arguments if any for the command */
void *arg
)
{
hMmcsd->regs->SDIOIEN = *(CSL_BitMask16*)arg;
}
/** ============================================================================
* @n@b CSL_mmcsdSdioIntrDisable
*
* @b Description
* @n This function disables SDIO interrutps of the MMCSD module.
*
* @b Arguments
* @verbatim
hMmcsd Handle to MMCSD instance
arg argument, if any for the command.
@endverbatim
*
* <b> Return Value </b> None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_mmcsdSdioIntrDisable (hMmcsd);
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE
void CSL_mmcsdSdioIntrDisable (
/** Pointer to the object that holds reference to the
* instance of MMCSD requested after the call
*/
CSL_MmcsdHandle hMmcsd,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -