| PDL for FM0+ Version1.0 Peripheral Driverl Library for FM0+

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
C:/pdl_v10/library/driver/mft/mft_frt.h File Reference
`#include "mcu.h"`
`#include "pdl_user.h"`
Include dependency graph for mft_frt.h:
This graph shows which files directly or indirectly include this file:

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...
## Defines
#define | stc_mftn_frt_t FM0P_MFT_FRT_TypeDef
#define | MFT0_FRT (*((volatile stc_mftn_frt_t *) FM0P_MFT0_FRT_BASE))
#define | MFT1_FRT (*((volatile stc_mftn_frt_t *) FM0P_MFT1_FRT_BASE))
#define | MFT2_FRT (*((volatile stc_mftn_frt_t *) FM0P_MFT2_FRT_BASE))
#define | FRT_INSTANCE_COUNT
#define | MFT_FRT_CH0 0
#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.
typedef enum en_mft_frt_clock | en_mft_frt_clock_t
| Mft Clock Setting.
typedef enum en_mft_frt_mode | en_mft_frt_mode_t
| FRT count mode.
typedef struct stc_mft_frt_config | stc_mft_frt_config_t
| FRT configure.
typedef struct stc_frt_int_sel | stc_frt_int_sel_t
| Enumeration of FRT interrupt selection.
typedef enum en_mft_frt_int | en_mft_frt_int_t
| Enumeration of FRT interrupt index.
typedef struct stc_frt_int_cb | stc_frt_int_cb_t
| FRT interrupt callback function.
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.
typedef struct stc_mft_frt_instance_data | stc_mft_frt_instance_data_t
| FRT instance data type.
## Enumerations
enum | en_frt_instance_index { FrtInstanceIndexFrt0, 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 FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch, stc_mft_frt_config_t *pstcFrtConfig)
| Init FRT module.
en_result_t | Mft_Frt_SetMaskZeroTimes (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch, uint8_t u8Times)
| set mask zero times
uint8_t | Mft_Frt_GetMaskZeroTimes (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch)
| get mask zero times
en_result_t | Mft_Frt_SetMaskPeakTimes (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch, uint8_t u8Times)
| set mask peak times
uint8_t | Mft_Frt_GetMaskPeakTimes (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch)
| get mask peak times
en_result_t | Mft_Frt_Start (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch)
| Start FRT.
en_result_t | Mft_Frt_Stop (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch)
| set frt stop
en_result_t | Mft_Frt_EnableInt (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch, stc_frt_int_sel_t *pstcIntSel, stc_frt_int_cb_t *pstcFrtIntCallback)
| enable frt interrupt
en_result_t | Mft_Frt_DisableInt (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch, stc_frt_int_sel_t *pstcIntSel)
| disable frt interrupt
en_int_flag_t | Mft_Frt_GetIntFlag (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch, en_mft_frt_int_t enIntType)
| get frt interrupt flag
en_result_t | Mft_Frt_ClrIntFlag (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch, en_mft_frt_int_t enIntType)
| clear frt interrupt flag
en_result_t | Mft_Frt_SetCountCycle (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch, uint16_t u16Cycle)
| set frt cycle value
en_result_t | Mft_Frt_SetCountVal (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch, uint16_t u16Count)
| set frt count value
uint16_t | Mft_Frt_GetCurCount (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, uint8_t u8Ch)
| get frt current count
void | Mft_Frt_IrqHandler (volatile FM0P_MFT_FRT_TypeDef *pstcFrt, stc_mft_frt_intern_data_t *pstcMftFrtInternData)
| FRT interrupt handler sub function.
## Variables
stc_mft_frt_instance_data_t | m_astcMftFrtInstanceDataLut [(PDL_PERIPHERAL_ENABLE_MFT0_FRT==PDL_ON?1:0)+(PDL_PERIPHERAL_ENABLE_MFT1_FRT==PDL_ON?1:0)+(PDL_PERIPHERAL_ENABLE_MFT2_FRT==PDL_ON?1:0)]
| Look-up table for all enabled FRT of MFT instances and their internal data.

## Detailed Description

Headerfile for MFT's Free Run Timer functions

History:

- 2014-12-21 0.1 Edison First version.
- 2014-01-16 0.2 Edison Add comments about how to use FRT with APIs

Definition in file mft_frt.h.