M480 BSP V3.05.005
The Board Support Package for M480 Series
Macros | Functions
ecap.h File Reference

EnHanced Input Capture Timer(ECAP) driver header file. More...

Go to the source code of this file.

Macros

#define ECAP_IC0
 
#define ECAP_IC1
 
#define ECAP_IC2
 
#define ECAP_NOISE_FILTER_CLKDIV_1
 
#define ECAP_NOISE_FILTER_CLKDIV_2
 
#define ECAP_NOISE_FILTER_CLKDIV_4
 
#define ECAP_NOISE_FILTER_CLKDIV_16
 
#define ECAP_NOISE_FILTER_CLKDIV_32
 
#define ECAP_NOISE_FILTER_CLKDIV_64
 
#define ECAP_CAP_INPUT_SRC_FROM_IC
 
#define ECAP_CAP_INPUT_SRC_FROM_CH
 
#define ECAP_DISABLE_COMPARE
 
#define ECAP_COMPARE_FUNCTION
 
#define ECAP_RISING_EDGE
 
#define ECAP_FALLING_EDGE
 
#define ECAP_RISING_FALLING_EDGE
 
#define ECAP_CAPTURE_TIMER_CLKDIV_1
 
#define ECAP_CAPTURE_TIMER_CLKDIV_4
 
#define ECAP_CAPTURE_TIMER_CLKDIV_16
 
#define ECAP_CAPTURE_TIMER_CLKDIV_32
 
#define ECAP_CAPTURE_TIMER_CLKDIV_64
 
#define ECAP_CAPTURE_TIMER_CLKDIV_96
 
#define ECAP_CAPTURE_TIMER_CLKDIV_112
 
#define ECAP_CAPTURE_TIMER_CLKDIV_128
 
#define ECAP_CAPTURE_TIMER_CLK_SRC_CAP_CLK
 
#define ECAP_CAPTURE_TIMER_CLK_SRC_CAP0
 
#define ECAP_CAPTURE_TIMER_CLK_SRC_CAP1
 
#define ECAP_CAPTURE_TIMER_CLK_SRC_CAP2
 
#define ECAP_SET_NOISE_FILTER_CLKDIV(ecap, u32ClkSel)
 This macro is used to select noise filter clock pre-divide number. More...
 
#define ECAP_NOISE_FILTER_DISABLE(ecap)
 This macro is used to disable noise filter. More...
 
#define ECAP_NOISE_FILTER_ENABLE(ecap, u32ClkSel)
 This macro is used to enable noise filter. More...
 
#define ECAP_ENABLE_INPUT_CHANNEL(ecap, u32Mask)
 This macro is used to enable input channel unit. More...
 
#define ECAP_DISABLE_INPUT_CHANNEL(ecap, u32Mask)
 This macro is used to disable input channel unit. More...
 
#define ECAP_SEL_INPUT_SRC(ecap, u32Index, u32Src)
 This macro is used to select input channel source. More...
 
#define ECAP_ENABLE_INT(ecap, u32Mask)
 This macro is used to enable input channel interrupt. More...
 
#define ECAP_DISABLE_INT(ecap, u32Mask)
 This macro is used to disable input channel interrupt. More...
 
#define ECAP_ENABLE_OVF_INT(ecap)
 This macro is used to enable input channel overflow interrupt. More...
 
#define ECAP_DISABLE_OVF_INT(ecap)
 This macro is used to disable input channel overflow interrupt. More...
 
#define ECAP_ENABLE_CMP_MATCH_INT(ecap)
 This macro is used to enable input channel compare-match interrupt. More...
 
#define ECAP_DISABLE_CMP_MATCH_INT(ecap)
 This macro is used to disable input channel compare-match interrupt. More...
 
#define ECAP_CNT_START(ecap)
 This macro is used to start capture counter. More...
 
#define ECAP_CNT_STOP(ecap)
 This macro is used to stop capture counter. More...
 
#define ECAP_SET_CNT_CLEAR_EVENT(ecap, u32Event)
 This macro is used to set event to clear capture counter. More...
 
#define ECAP_ENABLE_CMP(ecap)
 This macro is used to enable compare function. More...
 
#define ECAP_DISABLE_CMP(ecap)
 This macro is used to disable compare function. More...
 
#define ECAP_ENABLE_CNT(ecap)
 This macro is used to enable input capture function. More...
 
#define ECAP_DISABLE_CNT(ecap)
 This macro is used to disable input capture function. More...
 
#define ECAP_SEL_CAPTURE_EDGE(ecap, u32Index, u32Edge)
 This macro is used to select input channel edge detection. More...
 
#define ECAP_SEL_RELOAD_TRIG_SRC(ecap, u32TrigSrc)
 This macro is used to select ECAP counter reload trigger source. More...
 
#define ECAP_SEL_TIMER_CLK_DIV(ecap, u32Clkdiv)
 This macro is used to select capture timer clock divide. More...
 
#define ECAP_SEL_TIMER_CLK_SRC(ecap, u32ClkSrc)
 This macro is used to select capture timer/counter clock source. More...
 
#define ECAP_GET_INT_STATUS(ecap)
 This macro is used to read input capture status. More...
 
#define ECAP_GET_CAPTURE_FLAG(ecap, u32Mask)
 This macro is used to get input channel interrupt flag. More...
 
#define ECAP_CLR_CAPTURE_FLAG(ecap, u32Mask)
 This macro is used to clear input channel interrupt flag. More...
 
#define ECAP_SET_CNT_VALUE(ecap, u32Val)
 This macro is used to set input capture counter value. More...
 
#define ECAP_GET_CNT_VALUE(ecap)
 This macro is used to get input capture counter value. More...
 
#define ECAP_GET_CNT_HOLD_VALUE(ecap, u32Index)
 This macro is used to get input capture counter hold value. More...
 
#define ECAP_SET_CNT_CMP(ecap, u32Val)
 This macro is used to set input capture counter compare value. More...
 

Functions

void ECAP_Open (ECAP_T *ecap, uint32_t u32FuncMask)
 Enable ECAP function. More...
 
void ECAP_Close (ECAP_T *ecap)
 Disable ECAP function. More...
 
void ECAP_EnableINT (ECAP_T *ecap, uint32_t u32Mask)
 This macro is used to enable input channel interrupt. More...
 
void ECAP_DisableINT (ECAP_T *ecap, uint32_t u32Mask)
 This macro is used to disable input channel interrupt. More...
 

Detailed Description

EnHanced Input Capture Timer(ECAP) driver header file.

Version
V3.00

SPDX-License-Identifier: Apache-2.0

Definition in file ecap.h.