csl_gpiogethwsetup.c

来自「TI达芬奇dm644x各硬件模块测试代码」· C语言 代码 · 共 76 行

C
76
字号
/*  ============================================================================
 *   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_gpioGetHwSetup.c
 *
 *  @brief    File for functional layer of CSL API @a CSL_gpioGetHwSetup()
 *
 *  Description
 *   - The @a CSL_gpioGetHwSetup() function definition & it's associated 
 *     functions 
 *  Path: \\(CSLPATH)\\ipmodules\\gpio\\src
 *
 *  @date 10 June, 2004
 *  @author Pratheesh Gangadhar (pratheesh@ti.com)
 */
 
#include <csl_gpio.h>

/** ===========================================================================
 *   @n@b CSL_gpioGetHwSetup
 *
 *   @b Description
 *   @n Gets the current setup of GPIO.
 *
 *   @b Arguments
 *   @verbatim
            hGpio            Handle to the GPIO instance

            setup           Pointer to setup structure which contains the
                            setup information of GPIO.
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Setup info load successful.
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle
 *   @li                    CSL_ESYS_INVPARAMS  - Invalid parameter
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n  The registers of the specified GPIO instance will be setup.
 *
 *   @b Modifies
 *   @n Hardware registers of the specified GPIO instance.
 *
 *   @b Example
 *   @verbatim
        CSL_GpioHandle       hGpio;
        CSL_GpioHwSetup      setup;
        CSL_Status           status;

        status = CSL_gpioGetHwSetup (hGpio, &setup);
     @endverbatim
 * ============================================================================
 */
#pragma CODE_SECTION (CSL_gpioGetHwSetup, ".text:csl_section:gpio");
CSL_Status CSL_gpioGetHwSetup ( 
    CSL_GpioHandle      hGpio,
    CSL_GpioHwSetup     *setup
)
{
    if (setup == NULL)
        return CSL_ESYS_INVPARAMS;
     
    if (hGpio == NULL)
        return CSL_ESYS_BADHANDLE;
        
    return CSL_SOK;
}

⌨️ 快捷键说明

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