![]() |
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_frt_config |
| FRT configure. More... | |
| struct | stc_frt_int_sel |
| Enumeration of FRT interrupt selection. More... | |
| struct | stc_frt_int_cb |
| FRT interrupt callback function. More... | |
| struct | stc_mft_frt_intern_data |
| FRT instance internal data, storing internal information for each enabled FRT instance. More... | |
| struct | stc_mft_frt_instance_data |
| FRT instance data type. More... | |
Macros | |
| #define | stc_mftn_frt_t FM4_MFT_FRT_TypeDef |
| #define | MFT0_FRT (*((volatile stc_mftn_frt_t *) FM4_MFT0_FRT_BASE)) |
| #define | MFT1_FRT (*((volatile stc_mftn_frt_t *) FM4_MFT1_FRT_BASE)) |
| #define | MFT2_FRT (*((volatile stc_mftn_frt_t *) FM4_MFT2_FRT_BASE)) |
| #define | MFT_FRT_CH0 0 |
| MFT Frt channel definition. More... | |
| #define | MFT_FRT_CH1 1 |
| #define | MFT_FRT_CH2 2 |
| #define | MFT_FRT_MAX_CH 3 |
Typedefs | |
| typedef enum en_frt_instance_index | en_frt_instance_index_t |
| Enumeration to define an index for each FRT instance. More... | |
| typedef enum en_mft_frt_clock | en_mft_frt_clock_t |
| Mft Clock Setting. More... | |
| typedef enum en_mft_frt_mode | en_mft_frt_mode_t |
| FRT count mode. More... | |
| typedef struct stc_mft_frt_config | stc_mft_frt_config_t |
| FRT configure. More... | |
| typedef struct stc_frt_int_sel | stc_frt_int_sel_t |
| Enumeration of FRT interrupt selection. More... | |
| typedef enum en_mft_frt_int | en_mft_frt_int_t |
| Enumeration of FRT interrupt index. More... | |
| typedef struct stc_frt_int_cb | stc_frt_int_cb_t |
| FRT interrupt callback function. More... | |
| typedef struct stc_mft_frt_intern_data | stc_mft_frt_intern_data_t |
| FRT instance internal data, storing internal information for each enabled FRT instance. More... | |
| typedef struct stc_mft_frt_instance_data | stc_mft_frt_instance_data_t |
| FRT instance data type. More... | |
Enumerations | |
| enum | en_frt_instance_index { FrtInstanceIndexFrt0 = 0, FrtInstanceIndexFrt1, FrtInstanceIndexFrt2 } |
| Enumeration to define an index for each FRT instance. More... | |
| enum | en_mft_frt_clock { FrtPclkDiv1 = 0, FrtPclkDiv2 = 1, FrtPclkDiv4 = 2, FrtPclkDiv8 = 3, FrtPclkDiv16 = 4, FrtPclkDiv32 = 5, FrtPclkDiv64 = 6, FrtPclkDiv128 = 7, FrtPclkDiv256 = 8, FrtPclkDiv512 = 9, FrtPclkDiv1024 = 10 } |
| Mft Clock Setting. More... | |
| enum | en_mft_frt_mode { FrtUpCount = 0, FrtUpDownCount = 1 } |
| FRT count mode. More... | |
| enum | en_mft_frt_int { enFrtZeroMatchInt = 0, enFrtPeakMatchInt } |
| Enumeration of FRT interrupt index. More... | |
Functions | |
| en_result_t | Mft_Frt_Init (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch, stc_mft_frt_config_t *pstcFrtConfig) |
| Init FRT module. More... | |
| en_result_t | Mft_Frt_SetMaskZeroTimes (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch, uint8_t u8Times) |
| set mask zero times More... | |
| uint8_t | Mft_Frt_GetMaskZeroTimes (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch) |
| get mask zero times More... | |
| en_result_t | Mft_Frt_SetMaskPeakTimes (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch, uint8_t u8Times) |
| set mask peak times More... | |
| uint8_t | Mft_Frt_GetMaskPeakTimes (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch) |
| get mask peak times More... | |
| en_result_t | Mft_Frt_Start (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch) |
| set frt start More... | |
| en_result_t | Mft_Frt_Stop (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch) |
| set frt stop More... | |
| en_result_t | Mft_Frt_EnableInt (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch, stc_frt_int_sel_t *pstcIntSel, stc_frt_int_cb_t *pstcFrtIntCallback) |
| enable frt interrupt More... | |
| en_result_t | Mft_Frt_DisableInt (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch, stc_frt_int_sel_t *pstcIntSel) |
| disable frt interrupt More... | |
| en_int_flag_t | Mft_Frt_GetIntFlag (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch, en_mft_frt_int_t enIntType) |
| get frt interrupt falg More... | |
| en_result_t | Mft_Frt_ClrIntFlag (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch, en_mft_frt_int_t enIntType) |
| clear frt interrupt falg More... | |
| en_result_t | Mft_Frt_SetCountCycle (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch, uint16_t u16Cycle) |
| set frt cycle value More... | |
| en_result_t | Mft_Frt_SetCountVal (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch, uint16_t u16Count) |
| set frt count value More... | |
| uint16_t | Mft_Frt_GetCurCount (volatile FM4_MFT_FRT_TypeDef *pstcMft, uint8_t u8Ch) |
| get frt current count More... | |
| void | Mft_Frt_IrqHandler (volatile FM4_MFT_FRT_TypeDef *pstcMft, stc_mft_frt_intern_data_t *pstcMftFrtInternData) |
| FRT interrupt handler sub function. More... | |
Variables | |
| stc_mft_frt_instance_data_t | m_astcMftFrtInstanceDataLut [] |
| Look-up table for all enabled FRT of MFT instances and their internal data. More... | |
Headerfile for MFT's Free Run Timer functions
History:
Definition in file mft_frt.h.