![]() |
M480 BSP V3.05.005
The Board Support Package for M480 Series
|
Macros | |
#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... | |
#define ECAP_CLR_CAPTURE_FLAG | ( | ecap, | |
u32Mask | |||
) |
This macro is used to clear input channel interrupt flag.
[in] | ecap | Specify ECAP port |
[in] | u32Mask | The input channel mask |
This macro will write 1 to clear the input channel_n interrupt flag.
#define ECAP_CNT_START | ( | ecap | ) |
#define ECAP_CNT_STOP | ( | ecap | ) |
#define ECAP_DISABLE_CMP | ( | ecap | ) |
#define ECAP_DISABLE_CMP_MATCH_INT | ( | ecap | ) |
#define ECAP_DISABLE_CNT | ( | ecap | ) |
#define ECAP_DISABLE_INPUT_CHANNEL | ( | ecap, | |
u32Mask | |||
) |
This macro is used to disable input channel unit.
[in] | ecap | Specify ECAP port |
[in] | u32Mask | The input channel mask |
This macro will disable the input channel_n to input capture.
#define ECAP_DISABLE_INT | ( | ecap, | |
u32Mask | |||
) |
#define ECAP_DISABLE_OVF_INT | ( | ecap | ) |
#define ECAP_ENABLE_CMP | ( | ecap | ) |
#define ECAP_ENABLE_CMP_MATCH_INT | ( | ecap | ) |
#define ECAP_ENABLE_CNT | ( | ecap | ) |
#define ECAP_ENABLE_INPUT_CHANNEL | ( | ecap, | |
u32Mask | |||
) |
This macro is used to enable input channel unit.
[in] | ecap | Specify ECAP port |
[in] | u32Mask | The input channel mask |
This macro will enable the input channel_n to input capture.
#define ECAP_ENABLE_INT | ( | ecap, | |
u32Mask | |||
) |
This macro is used to enable input channel interrupt.
[in] | ecap | Specify ECAP port |
[in] | u32Mask | The input channel mask |
This macro will enable the input channel_n interrupt.
#define ECAP_ENABLE_OVF_INT | ( | ecap | ) |
#define ECAP_GET_CAPTURE_FLAG | ( | ecap, | |
u32Mask | |||
) |
This macro is used to get input channel interrupt flag.
[in] | ecap | Specify ECAP port |
[in] | u32Mask | The input channel mask |
This macro will write 1 to get the input channel_n interrupt flag.
#define ECAP_GET_CNT_HOLD_VALUE | ( | ecap, | |
u32Index | |||
) |
#define ECAP_GET_CNT_VALUE | ( | ecap | ) |
#define ECAP_GET_INT_STATUS | ( | ecap | ) |
#define ECAP_NOISE_FILTER_DISABLE | ( | ecap | ) |
#define ECAP_NOISE_FILTER_ENABLE | ( | ecap, | |
u32ClkSel | |||
) |
This macro is used to enable noise filter.
[in] | ecap | Specify ECAP port |
[in] | u32ClkSel | Select noise filter clock divide number |
This macro will enable the noise filter of input capture and set noise filter clock divide.
#define ECAP_SEL_CAPTURE_EDGE | ( | ecap, | |
u32Index, | |||
u32Edge | |||
) |
This macro is used to select input channel edge detection.
[in] | ecap | Specify ECAP port |
[in] | u32Index | The input channel number |
[in] | u32Edge | The input source |
This macro will select input capture can detect falling edge, rising edge or either rising or falling edge change.
#define ECAP_SEL_INPUT_SRC | ( | ecap, | |
u32Index, | |||
u32Src | |||
) |
This macro is used to select input channel source.
[in] | ecap | Specify ECAP port |
[in] | u32Index | The input channel number |
[in] | u32Src | The input source |
This macro will select the input source from ICx, CHx.
#define ECAP_SEL_RELOAD_TRIG_SRC | ( | ecap, | |
u32TrigSrc | |||
) |
This macro is used to select ECAP counter reload trigger source.
[in] | ecap | Specify ECAP port |
[in] | u32TrigSrc | The input source |
This macro will select capture counter reload trigger source.
#define ECAP_SEL_TIMER_CLK_DIV | ( | ecap, | |
u32Clkdiv | |||
) |
This macro is used to select capture timer clock divide.
[in] | ecap | Specify ECAP port |
[in] | u32Clkdiv | The input source |
This macro will select capture timer clock has a pre-divider with eight divided option.
#define ECAP_SEL_TIMER_CLK_SRC | ( | ecap, | |
u32ClkSrc | |||
) |
This macro is used to select capture timer/counter clock source.
[in] | ecap | Specify ECAP port |
[in] | u32ClkSrc | The input source |
This macro will select capture timer/clock clock source.
#define ECAP_SET_CNT_CLEAR_EVENT | ( | ecap, | |
u32Event | |||
) |
This macro is used to set event to clear capture counter.
[in] | ecap | Specify ECAP port |
[in] | u32Event | The input channel number |
This macro will enable and select compare or capture event that can clear capture counter.
#define ECAP_SET_CNT_CMP | ( | ecap, | |
u32Val | |||
) |
#define ECAP_SET_CNT_VALUE | ( | ecap, | |
u32Val | |||
) |
#define ECAP_SET_NOISE_FILTER_CLKDIV | ( | ecap, | |
u32ClkSel | |||
) |
This macro is used to select noise filter clock pre-divide number.
[in] | ecap | Specify ECAP port |
[in] | u32ClkSel | The noise filter clock divide number |
This macro will set the sampling frequency of the noise filter cock.
void ECAP_Close | ( | ECAP_T * | ecap | ) |
void ECAP_DisableINT | ( | ECAP_T * | ecap, |
uint32_t | u32Mask | ||
) |
This macro is used to disable input channel interrupt.
[in] | ecap | Specify ECAP port |
[in] | u32Mask | The input channel number |
This macro will disable the input channel_n interrupt.
void ECAP_EnableINT | ( | ECAP_T * | ecap, |
uint32_t | u32Mask | ||
) |
This macro is used to enable input channel interrupt.
[in] | ecap | Specify ECAP port |
[in] | u32Mask | The input channel Mask |
This macro will enable the input channel_n interrupt.
void ECAP_Open | ( | ECAP_T * | ecap, |
uint32_t | u32FuncMask | ||
) |
Enable ECAP function.
[in] | ecap | The pointer of the specified ECAP module. |
[in] | u32FuncMask | Input capture function select |
This macro enable input capture function and select compare and reload function.