📄 csl_gpioclose.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_gpioClose.c
*
* @brief File for functional layer of CSL API @a CSL_gpioClose()
*
* Description
* - The @a CSL_gpioClose() function definition & it's associated functions
*
* Path: \\(CSLPATH)\\ipmodules\\gpio\\src
*
* @date 10 June, 2004
* @author Pratheesh Gangadhar (pratheesh@ti.com)
*/
/* ============================================================================
* Revision History
* ===============
* 11-Oct-2004 Nsr renamed the local variable "st" as "status"
* 07-Sep-2004 Nsr Updated function and documentation for CSL_gpioclose.
* - Removed the include file, csl_resource.h.
*
* ============================================================================
*/
#include <csl_gpio.h>
/** ===========================================================================
* @n@b CSL_gpioClose
*
* @b Description
* @n This function closes the specified instance of GPIO.
*
* @b Arguments
* @verbatim
hGpio Handle to the GPIO instance
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Close successful
* @li CSL_ESYS_BADHANDLE - Invalid handle
*
* @b Example
* @verbatim
CSL_GpioHandle hGpio;
CSL_status status;
...
status = CSL_gpioClose(hGpio);
@endverbatim
* ============================================================================
*/
#pragma CODE_SECTION (CSL_gpioClose, ".text:csl_section:gpio");
CSL_Status CSL_gpioClose(
/** Pointer to the object that holds reference to the
* instance of GPIO requested after the call
*/
CSL_GpioHandle hGpio
)
{
/* Indicate in the CSL global dgpio structure that the peripheral
* has been unreserved */
CSL_Status status;
if (hGpio != NULL) {
hGpio->regs = (CSL_GpioRegsOvly)NULL;
hGpio->gpioNum = (CSL_InstNum)-1;
status = CSL_SOK;
}
else {
status = CSL_ESYS_BADHANDLE;
}
return status;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -