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

📄 csl_gpiogethwstatus.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_gpioGetHwStatus.c
 *
 *  \brief    File for functional layer of CSL API \a CSL_gpioGetHwStatus()
 *
 *  Path: \\(CSLPATH)\\ipmodules\\gpio\\src
 *
 *  \date 11 June, 2004
 *  \author Pratheesh Gangadhar
 */
 
/* ===========================================================================
 *  Revision History
 *  ===============
 *  04-Sep-2004 Nsr Updated the source csl_gpioGetHwStatus.c for the new CSL 
 *                  format.
 *
 * ============================================================================
 */
 
#include <csl_gpio.h>
#include <csl_gpioAux.h>

/** ============================================================================
 *   @n@b CSL_gpioGetHwStatus
 *
 *   @b Description
 *   @n Gets the status of the different operations of GPIO.
 *
 *   @b Arguments
 *   @verbatim
            hGpio            Handle to the GPIO instance

            query           The query to this API of GPIO 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_GpioHandle          hGpio;
        CSL_GpioHwStatusQuery   query;
        void                    reponse;

        status = CSL_gpioGetHwStatus (hGpio, query, &response);

     @endverbatim
 * =============================================================================
 */
#pragma CODE_SECTION (CSL_gpioGetHwStatus, ".text:csl_section:gpio");
CSL_Status CSL_gpioGetHwStatus(
    CSL_GpioHandle         hGpio,
    CSL_GpioHwStatusQuery  query, 
    void                   *response
)
{
    CSL_Status status = CSL_SOK;
    
    if (hGpio == NULL) {
        status = CSL_ESYS_BADHANDLE;
        return status;
    }
    
    switch (query) {            
        case CSL_GPIO_QUERY_PID:
            CSL_gpioGetPid (hGpio, response);
            break;
            
        case CSL_GPIO_QUERY_BINTEN_STAT:
            CSL_gpioGetBintenStat (hGpio, response);
            break;    
            
        default:
            status = CSL_ESYS_INVQUERY;
            break;
    }
    
    return status;
}

⌨️ 快捷键说明

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