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

📄 csl_pmxclose.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_pmxClose.c
 *
 *    @brief File for functional layer of CSL API @a CSL_pmxClose()
 *
 *  Path: \\(CSLPATH)\\ipmodules\\pmx\\src
 *
 *  Description
 *    - The @a CSL_pmxClose() function definition & it's associated functions
 *
 */

/* =============================================================================
 *  Revision History
 *  ===============
 *  18-dec-2004 BRN file created
 *
 * =============================================================================
 */

#include <csl_pmx.h>

/** ===========================================================================
 *   @n@b CSL_pmxClose
 *
 *   @b Description
 *   @n he Close call releases the resource and appropriate shared pins.
 *      
 *   @b Arguments
 *   @verbatim
            hPmx         Handle to the PMX instance 
     @endverbatim
 *
 *   <b> Return Value   CSL_Status
 *   @li                    CSL_SOK            - PMX is closed
 *                                               successfully
 *
 *   @li                    CSL_ESYS_BADHANDLE - The handle passed is invalid
 *
 *   <b> Pre Condition 
 *   @n  None
 *
 *   <b> Post Condition 
 *   @n  1. The PMX CSL APIs can not be called until the PMX
 *          CSL is reopened again using CSL_uartOpen() 
 *
 *   @b Modifies
 *   @n  None
 * 
 * <b> Usage Constraints: </b>
 * Both @a CSL_pmxInit() and @a CSL_pmxOpen() must be called successfully
 * in that order before @a CSL_pmxClose() can be called.
 *
 * @b Example:
 * @verbatim

   CSL_pmxHandle hPmx;
   ...
   CSL_pmxClose(hPmx);
   @endverbatim
 *
 * @return returns the status of the operation (see @a CSL_Status)
 * ============================================================================
 */
#pragma CODE_SECTION (CSL_pmxClose, ".text:csl_section:pmx");
CSL_Status  CSL_pmxClose(
    /** Pointer to the object that holds reference to the
     *  instance of PMX requested after the call
     */
    CSL_PmxHandle                         hPmx
)
{
    CSL_Status  status;

    if(hPmx != NULL) {
        hPmx->regs    = (CSL_PmxRegsOvly)NULL;
        hPmx->perNum  = (CSL_InstNum)-1;
        status        = CSL_SOK;
    }                 
    else {            
        status        = CSL_ESYS_BADHANDLE;
    }

    return status;
}

⌨️ 快捷键说明

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