📄 csl_pwlaux.h
字号:
/** ============================================================================
* @file csl_pwlAux.h
*
* @path $(CSLPATH)\arm\pwl\inc
*
* @desc PWL CSL implementation for ARM side
*/
/* ============================================================================
* Copyright (c) Texas Instruments Inc 2002, 2003, 2004
*
* Use of this software is controlled by the terms and conditions found in the
* license agreement under which this software has been supplied.
* ===========================================================================
*/
/* @(#) PSP/CSL 3.00.01.00[5912] (2004-06-01) */
/* =============================================================================
* Revision History
* ===============
* 09-Jul-2004 sp File Created
*
* =============================================================================
*/
#ifndef _CSL_PWLAUX_H_
#define _CSL_PWLAUX_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <csl_pwl.h>
/** ============================================================================
* @n@b CSL_pwlGetLevel
*
* @b Description
* @n This function fetches the mean value of the PWL output signal.
*
* @b Arguments
* @verbatim
hPwl Handle to the PWL instance
@endverbatim
*
* <b> Return Value </b> value
* @li value - Mean value of PWL output signal
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint8 meanVal;
...
meanVal = CSL_pwlGetLevel (hPwl);
@endverbatim
* ===========================================================================
*/
static inline
Uint8 CSL_pwlGetLevel (
CSL_PwlHandle hPwl
)
{
Uint16 value;
value = CSL_FEXT(hPwl->regs->PWL_LEVEL, PWL_PWL_LEVEL_PWL_LEVEL);
return value;
}
/** ============================================================================
* @n@b CSL_pwlDisableClk
*
* @b Description
* @n This function disables the PWL clock.
*
* @b Arguments
* @verbatim
hPwl Handle to the PWL instance
@endverbatim
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n The clock is disabled
*
* @b Modifies
* @n PWL hardware registers
*
* @b Example
* @verbatim
void CSL_pwlDisableClk (hPwl);
@endverbatim
* ===========================================================================
*/
static inline
void CSL_pwlDisableClk (
CSL_PwlHandle hPwl
)
{
CSL_FINST(hPwl->regs->PWL_CTRL, PWL_PWL_CTRL_CLK_ENABLE, DIS);
}
/** ============================================================================
* @n@b CSL_pwlEnableClk
*
* @b Description
* @n This function enables the PWL clock.
*
* @b Arguments
* @verbatim
hPwl Handle to the PWL instance
@endverbatim
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n The clock is enabled
*
* @b Modifies
* @n PWL hardware registers
*
* @b Example
* @verbatim
void CSL_pwlEnableClk (hPwl);
@endverbatim
* ===========================================================================
*/
static inline
void CSL_pwlEnableClk (
CSL_PwlHandle hPwl
)
{
CSL_FINST(hPwl->regs->PWL_CTRL, PWL_PWL_CTRL_CLK_ENABLE, EN);
}
#ifdef __cplusplus
}
#endif
#endif /* _CSL_PWLAUX_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -