![]() |
PDL for FM4
Version1.2
Peripheral Driverl Library for FM4
|
#include "pdl.h"

Go to the source code of this file.
Data Structures | |
| struct | stc_mft_icu_config |
| Structure of Mft icu configuration. More... | |
| struct | stc_mft_icu_intern_data |
| Icu instance internal data, storing internal information for each enabled Icu instance. More... | |
| struct | stc_mft_icu_instance_data |
| Mft_icu instance data type. More... | |
Macros | |
| #define | stc_mftn_icu_t FM4_MFT_ICU_TypeDef |
| #define | MFT0_ICU (*((volatile stc_mftn_icu_t *) FM4_MFT0_ICU_BASE)) |
| #define | MFT1_ICU (*((volatile stc_mftn_icu_t *) FM4_MFT1_ICU_BASE)) |
| #define | MFT2_ICU (*((volatile stc_mftn_icu_t *) FM4_MFT2_ICU_BASE)) |
| #define | MFT_ICU_CH0 0u |
| #define | MFT_ICU_CH1 1u |
| #define | MFT_ICU_CH2 2u |
| #define | MFT_ICU_CH3 3u |
| #define | MFT_ICU_CHx_MAX 3u |
| #define | MFT_ICU_INSTANCE_COUNT |
Typedefs | |
| typedef enum en_icu_instance_index | en_icu_instance_index_t |
| Enumeration to define an index for each ICU instance. More... | |
| typedef enum en_mft_icu_frt | en_mft_icu_frt_t |
| Frt channel. More... | |
| typedef enum en_mft_icu_mode | en_mft_icu_mode_t |
| Icu mode. More... | |
| typedef enum en_icu_edge | en_mft_icu_edge_t |
| Icu edge. More... | |
| typedef struct stc_mft_icu_config | stc_mft_icu_config_t |
| Structure of Mft icu configuration. More... | |
| typedef struct stc_mft_icu_intern_data | stc_mft_icu_intern_data_t |
| Icu instance internal data, storing internal information for each enabled Icu instance. More... | |
| typedef struct stc_mft_icu_instance_data | stc_mft_icu_instance_data_t |
| Mft_icu instance data type. More... | |
Enumerations | |
| enum | en_icu_instance_index { IcuInstanceIndexIcu0 = 0u, IcuInstanceIndexIcu1 = 1u, IcuInstanceIndexIcu2 = 2u } |
| Enumeration to define an index for each ICU instance. More... | |
| enum | en_mft_icu_frt { Frt0ToIcu = 0u, Frt1ToIcu = 1u, Frt2ToIcu = 2u, IcuFrtToExt0 = 3u, IcuFrtToExt1 = 4u } |
| Frt channel. More... | |
| enum | en_mft_icu_mode { IcuDisable = 0u, IcuRisingDetect = 1u, IcuFallingDetect = 2u, IcuBothDetect = 3u } |
| Icu mode. More... | |
| enum | en_icu_edge { IcuFallingEdge = 0u, IcuRisingEdge = 1u } |
| Icu edge. More... | |
Functions | |
| en_result_t | Mft_Icu_SelFrt (volatile FM4_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch, en_mft_icu_frt_t enFrt) |
| Select FRTx channel to connect to ICUx. More... | |
| en_result_t | Mft_Icu_ConfigDetectMode (volatile FM4_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch, en_mft_icu_mode_t enMode) |
| Configure ICU module detection mode(different edge) More... | |
| en_result_t | Mft_Icu_EnableInt (volatile FM4_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch, func_ptr_t pfnCallback) |
| Enable Mft Icu interrupt. More... | |
| en_result_t | Mft_Icu_DisableInt (volatile FM4_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch) |
| Disable Mft Icu interrupt and release callback function. More... | |
| en_int_flag_t | Mft_Icu_GetIntFlag (volatile FM4_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch) |
| Get interrupt flag. More... | |
| en_result_t | Mft_Icu_ClrIntFlag (volatile FM4_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch) |
| Clear interrupt flag. More... | |
| en_mft_icu_edge_t | Mft_Icu_GetLastEdge (volatile FM4_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch) |
| Get the latest captured edge type. More... | |
| uint16_t | Mft_Icu_GetCaptureData (volatile FM4_MFT_ICU_TypeDef *pstcMftIcu, uint8_t u8Ch) |
| Readout captured data value. More... | |
| void | Mft_Icu_IrqHandler (volatile FM4_MFT_ICU_TypeDef *pstcMftIcu, stc_mft_icu_intern_data_t *pstcMftIcuInternData) |
| Device Interrupt handler. More... | |
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)] |
Headerfile for MFT's Input Capture Unit functions
History:
Definition in file mft_icu.h.