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

📄 csl_pwmclose.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_pwmClose.c
 *  
 *  @brief File for functional layer of CSL API @a CSL_pwmClose()
 *
 *  Path: \\(CSLPATH)\\ipmodules\\pwm\\src
 *
 *  Description
 *    - The @a CSL_pwmClose() function definition & it's associated functions
 *
 *  @date 27 April, 2004
 *  @author Pratheesh Gangadhar
 */
 
/* =============================================================================
 *  Revision History
 *  ===============
 *  03-Sep-2004 brn Updated for the new CSL architecture.
 *  11-Oct_2004 brn File updated with the review comments
 * =============================================================================
 */
 
 
#include <csl_pwm.h>

/** ============================================================================
 *   @n@b CSL_pwmClose
 *                                                                             
 *   @b Description                                                            
 *   @n This function closes the specified instance of PWM.
 *                                                                             
 *   @b Arguments                                                              
 *   @verbatim                                                                 
            hPwm            Handle to the PWM instance
     @endverbatim                                                              
 *                                                                             
 *   <b> Return Value </b>  CSL_Status                                         
 *   @li                    CSL_SOK             - Close successful
 *   @li                    CSL_ESYS_BADHANDLE  - Invalid handle
 *                                                                             
 *   @b Example                                                                
 *   @verbatim                                                                 
            CSL_PwmHandle   hPwm;                                              
            CSL_status          status;
                                                                               
            ...                                                                
                                                                               
            status = CSL_pwmClose(hPwm);
     @endverbatim                                                              
 * =============================================================================
 */                                                                            
#pragma CODE_SECTION (CSL_pwmClose, ".text:csl_section:pwm");                  
CSL_Status  CSL_pwmClose (                                                     
    CSL_PwmHandle    hPwm                                                      
)                                                                             
{                                                                             
    CSL_Status  status;                                                            
                                                                              
    if (hPwm != NULL) {                                                        
        hPwm->regs    = (CSL_PwmRegsOvly)NULL;                                 
        hPwm->perNum  = (CSL_InstNum)-1;                                       
       status         = CSL_SOK;                                                          
    } 
    else {                                                                   
       status = CSL_ESYS_BADHANDLE;                                               
    }                                                                          
                                                                              
    return status;                                                                 
}




⌨️ 快捷键说明

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