PDL for FM4  Version1.2
Peripheral Driverl Library for FM4
mft_wfg.c File Reference
#include "mft_wfg.h"
Include dependency graph for mft_wfg.c:

Go to the source code of this file.

Macros

#define WFG_INSTANCE_COUNT
 Macro to return the number of enabled MFT instances. More...
 

Functions

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

Variables

stc_mft_wfg_instance_data_t m_astcMftWfgInstanceDataLut []
 Look-up table for all enabled WFG instances and their internal data. More...
 

Detailed Description

A detailed description is available at WFG Module description

History:

  • 2013-03-21 0.1 Frank First version.

Definition in file mft_wfg.c.