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

Go to the source code of this file.

Functions

static stc_mft_icu_intern_data_tMftIcuGetInternDataPtr (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu)
 Return the internal data for a certain MFT_ICU instance.
static void Mft_Icu_InitIrq (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu)
 Device dependent initialization of interrupts according CMSIS with level defined in pdl.h.
static void Mft_Icu_DeInitIrq (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu)
 Device dependent de-initialization of interrupts according CMSIS.
void Mft_Icu_IrqHandler (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu, stc_mft_icu_intern_data_t *pstcMftIcuInternData)
 Device Interrupt handler.
en_result_t Mft_Icu_SelFrt (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch, en_mft_icu_frt_t enFrt)
 Select FRTx channel to connect to ICUx.
en_result_t Mft_Icu_ConfigDetectMode (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch, en_mft_icu_mode_t enMode)
 Configure ICU module detection mode(different edge)
en_result_t Mft_Icu_EnableInt (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch, func_ptr_t pfnCallback)
 Enable Mft Icu interrupt.
en_result_t Mft_Icu_DisableInt (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch)
 Disable Mft Icu interrupt and release callback function.
en_int_flag_t Mft_Icu_GetIntFlag (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch)
 Get interrupt flag.
en_result_t Mft_Icu_ClrIntFlag (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch)
 Clear interrupt flag.
en_mft_icu_edge_t Mft_Icu_GetLastEdge (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch)
 Get the latest captured edge type.
uint16_t Mft_Icu_GetCaptureData (volatile FM0P_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch)
 Readout captured data value.

Variables

stc_mft_icu_instance_data_t m_astcMftIcuInstanceDataLut [(uint8_t)(PDL_PERIPHERAL_ENABLE_MFT0_ICU==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFT1_ICU==PDL_ON)+(uint8_t)(PDL_PERIPHERAL_ENABLE_MFT2_ICU==PDL_ON)]

Detailed Description

A detailed description is available at ICU Module description

History:

  • 2014-01-10 1.0 Edison Zhang First version.
  • 2014-01-21 1.1 Edison Zhang Change the "MftIcuGetInternDataPtr" location to avoid warning when it is unused.
  • 2014-05-14 1.2 Update some comments and add some parameter check.

Definition in file mft_icu.c.