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

📄 csl_edmaregionclose.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_edmaRegionClose.c
 *
 *  @brief    File for functional layer of CSL API @a CSL_edmaRegionClose()
 *
 *  Path: \\(CSLPATH)\\ipmodules\\edma\\src
 *
 *  @date 
 *  @author Ruchika Kharwar
 */
 
/* =============================================================================
 *  Revision History
 *  ===============
 *  10-Aug-2005  brn      Updated for doxygen documentation and butification
 * =============================================================================
 */

/* File contains all the related functionality to do with Region region acquisitions */

#include <csl_edma.h>

/** ===========================================================================
 *  @n@b   CSL_EdmaRegionClose
 *
 *  @brief
 *     The shadow region is returned to the available pool of shadow regions
 *
 *   @b Arguments
 *   @verbatim
            hRegion         Shadow region handle
     @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>
 *  BCSL_edmaInit(),  CSL_edmaOpen(),  CSL_edmaRegionOpen() must have been called
 *  successfully before this function can be called..
 *
 * @b Example:
 *  @verbatim


    CSL_EdmaObj ModuleObj;
 *  CSL_EdmaHandle hModHndl;
 *  
 *  CSL_EdmaRegionObj RegionObj;
 *  CSL_EdmaRegionHndl shHndl;
 *  
 *  CSL_EdmaChanObj ChObj;
 *  CSL_EdmaChanHandle chHndl;
 *  
 * // Initialization
    CSL_edmaInit(NULL);
    
    // Open Module
    edmaHndl = CSL_edmaOpen(NULL,CSL_EDMA_0,NULL,&modStatus);
    
    // Region Open 
    regParam.regionNum = CSL_EDMA_REGION_0;
    shHndl = CSL_edmaRegionOpen(&RegionObj,CSL_EDMA_0,&regParam,&status);   
 *  
 *  // Close the Region Region
 *  CSL_edmaRegionClose(shHndl);    

    @endverbatim
 *
 *
 * ============================================================================
 */
#pragma CODE_SECTION (CSL_edmaRegionClose, ".text:csl_section:edma"); 
CSL_Status  CSL_edmaRegionClose(
    /** pointer to the object that holds reference to the shadow region opened */
    CSL_EdmaRegionHandle        hShHndl
) 
{
    CSL_Status status = CSL_SOK;
    if (hShHndl != NULL) {
        hShHndl->shregs  = (CSL_EdmaccShadowRegsOvly)NULL;
        hShHndl->region  = -1;
        hShHndl->edmaNum = (CSL_InstNum)-1;            
        status = CSL_SOK;
    }
    else {
        status = CSL_ESYS_BADHANDLE;
    }
    
    return status;
}

⌨️ 快捷键说明

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