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

📄 csl_mmcsdaux.h

📁 ccs下对dm6446的测试程序
💻 H
📖 第 1 页 / 共 3 页
字号:
    /* Arguments if any for the command */
    void                   *arg
)
{

      hMmcsd->regs->SDIOIEN &= ~(*(CSL_BitMask16*)arg);
}

/** ============================================================================
 *   @n@b CSL_mmcsdSdioClearStatus
 *
 *   @b Description
 *   @n This function clears the SDIO status 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_mmcsdSdioClearStatus (hMmcsd);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdSdioClearStatus (
    /** 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
)
{
    /* Write 1 to clear */
    hMmcsd->regs->SDIOIST = *(CSL_BitMask16*)arg;
}


/** ============================================================================
 *   @n@b CSL_mmcsdGetCmdIndex
 *
 *   @b Description
 *   @n This function gets the command index of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

     @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_mmcsdGetCmdIndex (hMmcsd);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetCmdIndex (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle        hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    *(Uint16*)response = hMmcsd->regs->MMCCIDX;
}

/** ============================================================================
 *   @n@b CSL_mmcsdGetResponse
 *
 *   @b Description
 *   @n This function gets the response of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

            response        Placeholder to return status.

     @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_mmcsdGetResponse (hMmcsd, response);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetResponse (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    CSL_MmcsdRegsOvly regMmcsd;
    /* Get the response to the last command sent by MMCSD */
    /* fetch the response from the response registers */
    regMmcsd = hMmcsd->regs;
    ((CSL_MmcsdResponse *)response)->response[0] = regMmcsd->MMCRSP01;
    ((CSL_MmcsdResponse *)response)->response[1] = regMmcsd->MMCRSP23;
    ((CSL_MmcsdResponse *)response)->response[2] = regMmcsd->MMCRSP45;
    ((CSL_MmcsdResponse *)response)->response[3] = regMmcsd->MMCRSP67;
}


/** ============================================================================
 *   @n@b CSL_mmcsdGetSdBusWidth
 *
 *   @b Description
 *   @n This function gets the SD bus width of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

            response        Placeholder to return status.

     @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_mmcsdGetSdBusWidth (hMmcsd, response);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetSdBusWidth (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle      hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    *(CSL_MmcsdBusWidth*)response = (CSL_MmcsdBusWidth)
                           CSL_FEXT ( hMmcsd->regs->MMCCTL,MMCSD_MMCCTL_WIDTH );
}


/** ============================================================================
 *   @n@b CSL_mmcsdGetNumBlks
 *
 *   @b Description
 *   @n This function gets the number of blocks of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

            response        Placeholder to return status.

     @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_mmcsdGetNumBlks (hMmcsd, response);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetNumBlks (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle      hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    /* Get the number of blocks yet to be transmitted */
    *(Uint16*)response = hMmcsd->regs->MMCNBLC;
}


/** ============================================================================
 *   @n@b CSL_mmcsdGetStatus0
 *
 *   @b Description
 *   @n This function gets the STATUS 0 of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

            response        Placeholder to return status.

     @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_mmcsdGetStatus0 (hMmcsd, response);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetStatus0 (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle      hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    /* Get the interrupt status of MMCSD */
    *(CSL_BitMask16*)response = hMmcsd->regs->MMCST0;

}


/** ============================================================================
 *   @n@b CSL_mmcsdGetStatus1
 *
 *   @b Description
 *   @n This function gets the STATUS 1 of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

            response        Placeholder to return status.

     @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_mmcsdGetStatus1 (hMmcsd, response);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetStatus1 (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle      hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    /* Get the interrupt status of MMCSD */
    *(CSL_BitMask16*)response = hMmcsd->regs->MMCST1;
}



/** ============================================================================
 *   @n@b CSL_mmcsdGetIntenStatus
 *
 *   @b Description
 *   @n This function gets the interrupt enable status of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

            response        Placeholder to return status.

     @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_mmcsdGetIntenStatus (hMmcsd, response);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetIntenStatus (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle      hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    /* Get the interrupts that have been enabled */
    *(CSL_BitMask16*)response = hMmcsd->regs->MMCIM;
}


/** ============================================================================
 *   @n@b CSL_mmcsdGetFifoStatus
 *
 *   @b Description
 *   @n This function gets the FIFO status of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

            response        Placeholder to return status.

     @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_mmcsdGetFifoStatus (hMmcsd, response);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetFifoStatus (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle      hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    CSL_MmcsdRegsOvly regMmcsd;
    regMmcsd = hMmcsd->regs;
    ((CSL_MmcsdFifoStat*)response)->threshold =
    (CSL_MmcsdFifoThreshold) CSL_FEXT (regMmcsd->MMCFIFOCTL,
                                       MMCSD_MMCFIFOCTL_FIFOLEV);
    ((CSL_MmcsdFifoStat*)response)->direction =
    (CSL_MmcsdFifoDir) CSL_FEXT (regMmcsd->MMCFIFOCTL,
                                 MMCSD_MMCFIFOCTL_FIFODIR);

}


/** ============================================================================
 *   @n@b CSL_mmcsdGetSdioStatus
 *
 *   @b Description
 *   @n This function gets the SDIO status of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

            response        Placeholder to return status.

     @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_mmcsdGetSdioStatus (hMmcsd, response);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetSdioStatus (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle      hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    *(CSL_BitMask16*)response = hMmcsd->regs->SDIOST0;
}


/** ============================================================================
 *   @n@b CSL_mmcsdGetSdioIntenStatus
 *
 *   @b Description
 *   @n This function gets the SDIO interrupt enable of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

            response        Placeholder to return status.

     @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_mmcsdGetSdioIntenStatus (hMmcsd, response);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetSdioIntenStatus (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle      hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    *(CSL_BitMask16*)response = hMmcsd->regs->SDIOIEN;
}


/** ============================================================================
 *   @n@b CSL_mmcsdGetSdioIntrStatus
 *
 *   @b Description
 *   @n This function gets the SDIO interrupt status of the MMCSD module.
 *
 *   @b Arguments
 *   @verbatim

            hMmcsd            Handle to MMCSD instance

            response        Placeholder to return status.

     @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_mmcsdGetSdioIntrStatus (hMmcsd, response);

     @endverbatim
 * ===========================================================================
 */
CSL_IDEF_INLINE
void CSL_mmcsdGetSdioIntrStatus (
    /** Pointer to the object that holds reference to the
     *  instance of MMCSD requested after the call
     */
    CSL_MmcsdHandle      hMmcsd,

    /** Placeholder to return the status. @a void* casted */
    void                 *response
)
{
    *(CSL_BitMask16*)response = hMmcsd->regs->SDIOIST;
}

#endif /* CSL_MMCSDAUX_H_ */

⌨️ 快捷键说明

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