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

📄 csl_nandgethwstatus.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_nandGetHwStatus.c
 *
 *    @brief    File for functional layer of CSL API @a CSL_nandGetHwStatus()
 *
 *  Description
 *    - The @a CSL_nandGetHwStatus() function definition & it's associated
 *      functions
 *
 *  Path: \\(CSLPATH)\\ipmodules\\nfc\\src
 *
 *  Modification 1
 *    - Modified on: 28/6/2004
 *    - Reason: created the sources
 *
 *  @date 28th June, 2004
 *  @author Santosh Narayanan.
 */

 /* =============================================================================
 *  Revision History
 *  ===============
 *  11-Oct_2004 Nsr Added the CSL_nandGetHwStatus() function header.
 *  03-Sep-2004 Nsr Updated the source csl_nandGetHwStatus.c for the new CSL 
 *                  format.
 *
 * =============================================================================
 */

#include <csl_nand.h>
#include <csl_nandAux.h> 

/** @brief Gets the status of the different operations.
 */
/** ============================================================================
 *   @n@b CSL_NandGetHwStatus
 *
 *   @b Description
 *   @n Gets the status of the different operations of NAND.
 *
 *   @b Arguments
 * @verbatim
            hNand           Handle to the NAND instance

            query           The query to this API of NAND 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_INVPARAMS  - Invalid parameter
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  None
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_NandHandle          hNand;
        CSL_NandHwStatusQuery   query;
        void                    reponse;

        status = CSL_NandGetHwStatus (hNand, query, &response);

     @endverbatim
 * =============================================================================
 */
#pragma CODE_SECTION (CSL_nandGetHwStatus, ".text:csl_section:nand")
CSL_Status  CSL_nandGetHwStatus(
    /** Pointer to the object that holds reference to the
     *  instance of NAND requested after the call 
     */
    CSL_NandHandle                         hNand,
    /** The query to this API which indicates the status 
     *  to be returned 
     */
    CSL_NandHwStatusQuery                  query,
    /** Placeholder to return the status. @a void* casted */
    void                                    *response
)
{
    CSL_Status status = CSL_SOK;
    
    if (hNand == NULL)
        return CSL_ESYS_BADHANDLE;

    switch(query) {        
        case CSL_NAND_QUERY_REV_ID_STATUS:
            CSL_nandGetRevIdStatus (hNand, response);
            break;
        
        case CSL_NAND_QUERY_ENDIANNESS:
            CSL_nandGetEndianness (hNand, response);
            break;
        
        case CSL_NAND_QUERY_RATE:
            CSL_nandGetRate (hNand, response);
            break;
        
        case CSL_NAND_QUERY_WR_INT_STATUS:
            CSL_nandGetWrIntStatus (hNand, response);
            break;
        
        case CSL_NAND_QUERY_LT_INT_STATUS:
            CSL_nandGetLtIntStatus (hNand, response);
            break;
        
        case CSL_NAND_QUERY_AT_INT_STATUS:
            CSL_nandGetAtIntStatus (hNand, response);
            break;
        
        case CSL_NAND_QUERY_NAND_FLASH_STATUS:
            CSL_nandGetFlashStatus (hNand, response);
            break;
        
        case CSL_NAND_QUERY_CS5_NAND_FLASH_ECC:
            CSL_nandGetCs5NandFlashEcc (hNand, response);
            break;
        
        case CSL_NAND_QUERY_CS4_NAND_FLASH_ECC:
            CSL_nandGetCs4NandFlashEcc (hNand, response);
            break;
        
        case CSL_NAND_QUERY_CS3_NAND_FLASH_ECC:
            CSL_nandGetCs3NandFlashEcc (hNand, response);
            break;
        
        case CSL_NAND_QUERY_CS2_NAND_FLASH_ECC:
            CSL_nandGetCs2NandFlashEcc (hNand, response);
            break;
        
        case CSL_NAND_QUERY_IODFT_TLEC:
            CSL_nandGetIodftTlec (hNand, response);
            break;  
        
        case CSL_NAND_QUERY_IODFT_MISR: 
            CSL_nandGetIodftMisr (hNand, response);
            break;
        
        case CSL_NAND_QUERY_RELEASE_NUM:
            CSL_nandGetReleaseNum (hNand, response);
            break;  
        
        default:
            status = CSL_ESYS_INVQUERY ;
            break;             
    }
    
    return status;
}

⌨️ 快捷键说明

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