📄 csl_edmachannelclose.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_edmaChannelClose.c
*
* @brief File for functional layer of CSL API @a CSL_edmaChannelClose()
*
* Path: \\(CSLPATH)\\ipmodules\\edma\\src
*
* @date
* @author Ruchika Kharwar
*/
/* =============================================================================
* Revision History
* ===============
* 10-Aug-2005 brn Updated for doxygen documentation and butification
* =============================================================================
*/
#include <csl_edma.h>
/** ===========================================================================
* @n@b CSL_edmaChannelClose
*
* @brief
* The channel cannot be accessed anymore using the handle
*
* @b Arguments
* @verbatim
hEdma Handle to the EDMA instance
@endverbatim
*
* <b> Return Value CSL_Status
* @li CSL_SOK - EDMA is closed
* successfully
*
* @li CSL_ESYS_BADHANDLE - The handle passed is invalid
*
* <b> Pre Condition
* @n None
*
* <b> Post Condition
* @n 1. The EDMA CSL APIs can not be called until the EDMA
* CSL is reopened again using CSL_uartOpen()
*
* @b Modifies
* @n None
*
* <b> Usage Constraints: </b>
* All @a CSL_edmaInit(), @a CSL_edmaOpen(), @a CSL_edmaChannelOpen() must be
* invoked successfully in that order before this API can be invoked.
* If the channel is opened in context of a Region, @a CSL_edmaRegionOpen()
* may also need to be invoked before this API. If a Shadow region is used
* then care of the DRAE settings must be taken.
*
* @b Example:
* @verbatim
* CSL_EdmaHandle hModule;
CSL_EdmaChanObj ChObj;
CSL_EdmaChanHandle hChannel;
CSL_EdmaChannelParam chParam;
CSL_Status edmaStatus;
// Initialization
CSL_edmaInit();
// Module Level Open
hModule = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&edmaStatus);
...
// Channel 0 is opened which is allocated to Region Region 0
chParam.regionNum = CSL_EDMA_REGION_GLOBAL;
chParam.chaNum = CSL_EDMA_CHA0;
hChannel = CSL_edmaChannelOpen(&edmaObj,
CSL_EDMA_0,
&chParam,
&edmaStatus);
...
// EDMA Channel Close Call
edmaStatus = CSL_edmaChannelClose(hChannel);
@endverbatim
*
* ============================================================================
*/
#pragma CODE_SECTION (CSL_edmaChannelClose, ".text:csl_section:edma");
CSL_Status CSL_edmaChannelClose(
/** a handle to the requested channel instance of the specified EDMA
* obtained through the CSL_edmaOpen() call */
CSL_EdmaChanHandle hEdma
)
{
CSL_Status status;
if (hEdma != NULL) {
hEdma->ccregs = (CSL_EdmaccRegsOvly)NULL;
hEdma->edmaNum = (CSL_InstNum)-1;
hEdma->chaNum = -1;
hEdma->region = -2;
status = CSL_SOK;
}
else {
status = CSL_ESYS_BADHANDLE;
}
return status;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -