![]() |
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_ocu_config |
| OCU configure. More... | |
| struct | stc_even_compare_config |
| The compare configuration of even OCU channel. More... | |
| struct | stc_odd_compare_config |
| The compare configuration of odd OCU channel. More... | |
| struct | stc_mft_ocu_intern_data |
| Structure of OCU internal data. More... | |
| struct | stc_mft_ocu_instance_data |
| OCU instance data type. More... | |
Macros | |
| #define | stc_mftn_ocu_t FM4_MFT_OCU_TypeDef |
| #define | MFT0_OCU (*((volatile stc_mftn_ocu_t *) FM4_MFT0_OCU_BASE)) |
| #define | MFT1_OCU (*((volatile stc_mftn_ocu_t *) FM4_MFT1_OCU_BASE)) |
| #define | MFT2_OCU (*((volatile stc_mftn_ocu_t *) FM4_MFT1_OCU_BASE)) |
| #define | MFT_OCU_CH0 0 |
| #define | MFT_OCU_CH1 1 |
| #define | MFT_OCU_CH2 2 |
| #define | MFT_OCU_CH3 3 |
| #define | MFT_OCU_CH4 4 |
| #define | MFT_OCU_CH5 5 |
| #define | MFT_OCU_MAXCH 6 |
| #define | MFT_OCU_CH10 0 |
| #define | MFT_OCU_CH32 1 |
| #define | MFT_OCU_CH54 2 |
Typedefs | |
| typedef enum en_ocu_instance_index | en_ocu_instance_index_t |
| Enumeration to define an index for each OCU instance. More... | |
| typedef enum en_mft_ocu_frt | en_mft_ocu_frt_t |
| select the FRT to be connected to OCU More... | |
| typedef enum en_ocu_rt_out_state | en_ocu_rt_out_state_t |
| output level of the RT pin state More... | |
| typedef enum en_ocu_occp_buf | en_ocu_occp_buf_t |
| buffer register function of OCCP More... | |
| typedef enum en_ocu_ocse_buf | en_ocu_ocse_buf_t |
| buffer register function of OCSE More... | |
| typedef struct stc_mft_ocu_config | stc_mft_ocu_config_t |
| OCU configure. More... | |
| typedef enum en_rt_status | en_rt_even_status_t |
| RT output status. More... | |
| typedef enum en_rt_status | en_rt_odd_status_t |
| typedef enum en_iop_flag_set_condition | en_iop_flag_even_t |
| The condition for IOP flag set. More... | |
| typedef enum en_iop_flag_set_condition | en_iop_flag_odd_t |
| typedef struct stc_even_compare_config | stc_even_compare_config_t |
| The compare configuration of even OCU channel. More... | |
| typedef struct stc_odd_compare_config | stc_odd_compare_config_t |
| The compare configuration of odd OCU channel. More... | |
| typedef struct stc_mft_ocu_intern_data | stc_mft_ocu_intern_data_t |
| Structure of OCU internal data. More... | |
| typedef struct stc_mft_ocu_instance_data | stc_mft_ocu_instance_data_t |
| OCU instance data type. More... | |
Enumerations | |
| enum | en_ocu_instance_index { OcuInstanceIndexOcu0 = 0, OcuInstanceIndexOcu1, OcuInstanceIndexOcu2 } |
| Enumeration to define an index for each OCU instance. More... | |
| enum | en_mft_ocu_frt { Frt0ToOcu, Frt1ToOcu, Frt2ToOcu, OcuFrtToExt } |
| select the FRT to be connected to OCU More... | |
| enum | en_ocu_rt_out_state { RtLowLevel = 0, RtHighLevel } |
| output level of the RT pin state More... | |
| enum | en_ocu_occp_buf { OccpBufDisable = 0, OccpBufTrsfByFrtZero, OccpBufTrsfByFrtPeak, OccpBufTrsfByFrtZeroPeak } |
| buffer register function of OCCP More... | |
| enum | en_ocu_ocse_buf { OcseBufDisable = 0, OcseBufTrsfByFrtZero, OcseBufTrsfByFrtPeak, OcseBufTrsfByFrtZeroPeak } |
| buffer register function of OCSE More... | |
| enum | en_rt_status { RtOutputHold = 0, RtOutputHigh, RtOutputLow, RtOutputReverse } |
| RT output status. More... | |
| enum | en_iop_flag_set_condition { IopFlagHold = 0, IopFlagSet } |
| The condition for IOP flag set. More... | |
Functions | |
| en_result_t | Mft_Ocu_Init (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t u8Ch, stc_mft_ocu_config_t *pstcOcuConfig) |
| Init OCU module. More... | |
| en_result_t | Mft_Ocu_SetEvenChCompareMode (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t EvenCh, stc_even_compare_config_t *pstcConfig) |
| Compare congifuration of even OCU channel. More... | |
| en_result_t | Mft_Ocu_SetOddChCompareMode (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t OddCh, stc_odd_compare_config_t *pstcConfig) |
| Compare congifuration of odd OCU channel. More... | |
| en_result_t | Mft_Ocu_EnableOperation (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t u8Ch) |
| enable ocu operation More... | |
| en_result_t | Mft_Ocu_DisableOperation (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t u8Ch) |
| Disable ocu operation. More... | |
| en_result_t | Mft_Ocu_EnableInt (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t u8Ch, func_ptr_t pfnCallback) |
| enable ocu interrupt More... | |
| en_result_t | Mft_Ocu_DisableInt (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t u8Ch) |
| enable ocu interrupt More... | |
| en_result_t | Mft_Ocu_WriteOccp (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t u8Ch, uint16_t u16Occp) |
| writ occp register More... | |
| uint16_t | Mft_Ocu_ReadOccp (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t u8Ch) |
| get occp register value More... | |
| en_int_flag_t | Mft_Ocu_GetIntFlag (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t u8Ch) |
| get ocu interrupt flag More... | |
| en_result_t | Mft_Ocu_ClrIntFlag (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t u8Ch) |
| clear ocu interrupt flag More... | |
| en_ocu_rt_out_state_t | Mft_Ocu_GetRtPinLevel (volatile FM4_MFT_OCU_TypeDef *pstcMft, uint8_t u8Ch) |
| Get RT pin level of OCU. More... | |
| void | Mft_Ocu_IrqHandler (volatile FM4_MFT_OCU_TypeDef *pstcMft, stc_mft_ocu_intern_data_t *pstcMftOcuInternData) |
| OCU module interrupt handler. More... | |
Variables | |
| stc_mft_ocu_instance_data_t | m_astcMftOcuInstanceDataLut [] |
| Look-up table for all enabled OCU instances and their internal data. More... | |
Headerfile for MFT's Output Compare Unit functions
History:
Definition in file mft_ocu.h.