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

📄 csl_mmcsdgethwstatus.c

📁 TI达芬奇dm644x各硬件模块测试代码
💻 C
字号:
/*  ============================================================================
 *   Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005                 
 *                                                                              
 *   Use of this software is controlled by the terms and conditions found in the
 *   license agreement under which this software has been supplied.             
 *   ===========================================================================
 */ 

/** \file csl_mmcsdGetHwStatus.c
 *    Path: \\(CSLPATH)\\ipmodules\\mmcsd\\src
 *  \brief    File for functional layer of CSL API \a CSL_mmcsdGetHwStatus()
 *
 *  \date 7 May, 2004
 *  \author Pratheesh Gangadhar (pratheesh@ti.com)
 */

/* =============================================================================
 *  Revision History
 *  ===============
 *  12-Oct-2004 Hs Added code to validate input parameters
 *                 Updated according to review comments
 *  31-aug-2004 Hs Updated CSL_mmcsdGetHwStatus to call respective functions.
 * =============================================================================
 */

#include <csl_mmcsd.h>
#include <csl_mmcsdAux.h>

/** ============================================================================
 *   @n@b CSL_mmcsdGetHwStatus
 *
 *   @b Description
 *   @n Gets the status of the different operations of mmcsd.
 *
 *   @b Arguments
 *   @verbatim
            hMmcsd        Handle to the mmcsd instance

            query         The query to this API of mmcsd which indicates the
                          status to be returned.

            response      Placeholder to return the status.

     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Status info return successful
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle
 *   @li                    CSL_ESYS_INVQUERY   - Invalid query command
 *   @li                    CSL_ESYS_INVPARAMS  - Invalid parameter
 *  
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_MmcsdHandle          hMmcsd;
        CSL_MmcsdHwStatusQuery   query;
        void                     reponse;

        status = CSL_mmcsdGetHwStatus (hMmcsd, query, &response);

     @endverbatim
 * =============================================================================
 */
#pragma CODE_SECTION (CSL_mmcsdGetHwStatus, ".text:csl_section:mmcsd");
CSL_Status  CSL_mmcsdGetHwStatus (
    CSL_MmcsdHandle hMmcsd,
    CSL_MmcsdHwStatusQuery query,
    void *response
)
{
    CSL_Status status = CSL_SOK;
    
    /* MISTRAL: kpn Added the following code to validate for input
     * arguments hMmcsd & response according to review comment no. 1 
     * for file csl_armpllcGetHwStatus
     */

    if (hMmcsd == NULL)
        return CSL_ESYS_BADHANDLE;

    if (response == NULL)
        return CSL_ESYS_INVPARAMS;
  
    switch (query) {
        case CSL_MMCSD_QUERY_CMD_INDEX:
            CSL_mmcsdGetCmdIndex (hMmcsd, response);
            break;
        case CSL_MMCSD_QUERY_RESPONSE:
            CSL_mmcsdGetResponse (hMmcsd, response);
            break;
        case CSL_MMCSD_QUERY_SD_BUSWIDTH:
            CSL_mmcsdGetSdBusWidth (hMmcsd, response);
            break;
        case CSL_MMCSD_QUERY_NUMBLKS:
            CSL_mmcsdGetNumBlks (hMmcsd, response);
            break;
        case CSL_MMCSD_QUERY_STATUS0:
            CSL_mmcsdGetStatus0 (hMmcsd, response);
            break;
        case CSL_MMCSD_QUERY_STATUS1:
            CSL_mmcsdGetStatus1 (hMmcsd, response);
            break;
        case CSL_MMCSD_QUERY_INTEN_STATUS:
            CSL_mmcsdGetIntenStatus (hMmcsd, response);
            break;
        case CSL_MMCSD_QUERY_FIFO_STATUS:
            CSL_mmcsdGetFifoStatus (hMmcsd, response);
            break;
        case CSL_MMCSD_QUERY_SDIO_STATUS:
            CSL_mmcsdGetSdioStatus (hMmcsd, response);
            break;
        case CSL_MMCSD_QUERY_SDIO_INTEN_STAT:
            CSL_mmcsdGetSdioIntenStatus (hMmcsd, response);
            break;
        case CSL_MMCSD_QUERY_SDIO_INTRSTAT:
            CSL_mmcsdGetSdioIntrStatus (hMmcsd, response);
            break;
        default:
            status = CSL_ESYS_INVQUERY;
        break;
      
    }
      
    return(status);
  
}

⌨️ 快捷键说明

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