PDL for FM0+  Version1.0
Peripheral Driverl Library for FM0+
C:/pdl_v10/library/driver/mft/mft_wfg.c File Reference
#include "mft_wfg.h"
Include dependency graph for mft_wfg.c:

Go to the source code of this file.

Functions

static stc_mft_wfg_intern_data_tMftGetInternDataPtr (volatile FM0P_MFT_WFG_TypeDef *pstcWfg)
 Return the internal data for a certain WFG instance.
void Mft_Wfg_IrqHandler (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, stc_mft_wfg_intern_data_t *pstcMftWfgInternData)
 WFG interrupt handler sub function.
static void Mft_Wfg_InitIrq (volatile FM0P_MFT_WFG_TypeDef *pstcWfg)
 Device dependent initialization of interrupts according CMSIS with level defined in pdl.h.
static void Mft_Wfg_DeInitIrq (volatile FM0P_MFT_WFG_TypeDef *pstcWfg)
 Device dependent de-initialization of interrupts according CMSIS.
en_result_t Mft_Wfg_ConfigMode (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh, en_mft_wfg_mode_t enMode)
 configure WFG mode
en_result_t Mft_Wfg_ConfigCtrlBits (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh, stc_wfg_ctrl_bits_t *pstcCtrlBits)
 configure WFG control bit
en_result_t Mft_Wfg_InitTimerClock (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh, en_wfg_timer_clock_t enClk)
 init timer clock
en_result_t Mft_Wfg_EnableTimerInt (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh, func_ptr_t pfnCallback)
 enable WFG timer interrupt
en_result_t Mft_Wfg_DisableTimerInt (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh)
 disable WFG timer interrupt
en_result_t Mft_Wfg_StartTimer (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh)
 Start WFG timer.
en_result_t Mft_Wfg_StopTimer (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh)
 Stop WFG timer.
en_int_flag_t Mft_Wfg_GetTimerIntFlag (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh)
 get WFG timer interrupt flag
en_result_t Mft_Wfg_ClrTimerIntFlag (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh)
 clear WFG timer interrupt flag
en_result_t Mft_Wfg_WriteTimerCountCycle (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh, uint16_t u16CycleA, uint16_t u16CycleB)
 write timer count cycle
en_result_t Mft_Wfg_SetTimerCycle (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh, uint16_t u16Count)
 set cycle of WFG timer
uint16_t Mft_Wfg_GetTimerCurCycle (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, uint8_t u8CoupleCh)
 get cycle of WFG timer
en_result_t Mft_Wfg_ConfigNzcl (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, stc_wfg_nzcl_config_t *pstcNzclConfig)
 configure NZCL
en_result_t Mft_Wfg_EnableDtifInt (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, stc_dtif_int_sel_t *pstcIntSel, stc_dtif_int_cb_t *pstcCallback)
 Enable DTIF interrupt.
en_result_t Mft_Wfg_DisableDtifInt (volatile FM0P_MFT_WFG_TypeDef *pstcWfg, stc_dtif_int_sel_t *pstcIntSel)
 Disable DTIF interrupt.
en_result_t Mft_Wfg_SwTiggerDtif (volatile FM0P_MFT_WFG_TypeDef *pstcWfg)
 set software trigger DTIF
en_int_flag_t Mft_Wfg_GetDigitalFilterIntFlag (volatile FM0P_MFT_WFG_TypeDef *pstcWfg)
 get Digital filter interrupt flag
en_result_t Mft_Wfg_ClrDigitalFilterIntFlag (volatile FM0P_MFT_WFG_TypeDef *pstcWfg)
 clear Digital filter interrupt flag
en_int_flag_t Mft_Wfg_GetAnalogFilterIntFlag (volatile FM0P_MFT_WFG_TypeDef *pstcWfg)
 get Analog Filter interrupt flag
en_result_t Mft_Wfg_ClrAnalogFilterIntFlag (volatile FM0P_MFT_WFG_TypeDef *pstcWfg)
 clear Analog Filter interrupt flag

Variables

stc_mft_wfg_instance_data_t m_astcMftWfgInstanceDataLut [(PDL_PERIPHERAL_ENABLE_MFT0_WFG==PDL_ON?1:0)+(PDL_PERIPHERAL_ENABLE_MFT1_WFG==PDL_ON?1:0)+(PDL_PERIPHERAL_ENABLE_MFT2_WFG==PDL_ON?1:0)]
 Look-up table for all enabled WFG instances and their internal data.

Detailed Description

A detailed description is available at WFG Module description

History:

  • 2013-12-21 0.1 Edison Zhang First version.

Definition in file mft_wfg.c.