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

📄 csl_gpiohwsetup.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_gpioHwSetup.c
 *
 *    @brief File for functional layer of CSL API @a CSL_gpioHwSetup()
 *
 *  Description
 *    - The @a CSL_gpioHwSetup() function definition,currently just a place 
 *     holder
 *
 *  Path: \\(CSLPATH)\\ipmodules\\gpio\\src
 *
 *  @date 10 June, 2004
 *  @author Pratheesh Gangadhar (pratheesh@ti.com)
 */
#include <csl_gpio.h>

/** ============================================================================
 *   @n@b CSL_gpioHwSetup
 *
 *   @b Description
 *   @n It configures the gpio registers as per the values passed
 *      in the hardware setup structure.
 *
 *   @b Arguments
 *   @verbatim
            hGpio            Handle to the GPIO instance
            hwSetup          Pointer to harware setup structure
     @endverbatim
 *
 *   <b> Return Value </b>  CSL_Status
 *   @li                    CSL_SOK             - Hardware setup successful.
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle
 *   @li                    CSL_ESYS_INVPARAMS  - Hardware structure is not
                                                  properly initialized
 *
 *   @b Modifies
 *   @n The hardware registers of GPIO.
 *
 *   @b Example
 *   @verbatim
        CSL_GpioHandle    hGpio;
        CSL_GpioObj       gpioObj;
        CSL_GpioHwSetup   hwSetup;
        CSL_status       status;

        ...

        hGpio = CSL_gpioOpen (&gpioObj, CSL_GPIO_PRIMARY, NULL, &status);

        status = CSL_gpioHwSetup(hGpio, &hwSetup);
 *   @endverbatim
 * ============================================================================
 */
#pragma CODE_SECTION (CSL_gpioHwSetup, ".text:csl_section:gpio");
CSL_Status CSL_gpioHwSetup(
    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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -