![]() |
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_qprc_int_sel |
| Enumeration to define QPRC interrupt selection. More... | |
| struct | stc_qprc_int_cb |
| Enumeration to define QPRC interrupt callback function. More... | |
| struct | stc_qprc_filter |
| Structure to configuration QPRC filter. More... | |
| struct | stc_qprc_config |
| Structure to configuration QPRC. More... | |
| struct | stc_qprc_intern_data |
| Structure of QPRC internal data. More... | |
| struct | stc_qprc_instance_data |
| Structure of QPRC instance data. More... | |
Macros | |
| #define | stc_qprcn_t FM4_QPRC_TypeDef |
| #define | stc_qprc_nfn_t FM4_QPRC_NF_TypeDef |
| #define | QPRC0 (*((volatile stc_qprcn_t *) FM4_QPRC0_BASE)) |
| #define | QPRC1 (*((volatile stc_qprcn_t *) FM4_QPRC1_BASE)) |
| #define | QPRC2 (*((volatile stc_qprcn_t *) FM4_QPRC2_BASE)) |
| #define | QPRC3 (*((volatile stc_qprcn_t *) FM4_QPRC3_BASE)) |
| #define | QPRCNF0 (*((volatile stc_qprc_nfn_t *) FM4_QPRC0_NF_BASE)) |
| #define | QPRCNF1 (*((volatile stc_qprc_nfn_t *) FM4_QPRC1_NF_BASE)) |
| #define | QPRCNF2 (*((volatile stc_qprc_nfn_t *) FM4_QPRC2_NF_BASE)) |
| #define | QPRCNF3 (*((volatile stc_qprc_nfn_t *) FM4_QPRC3_NF_BASE)) |
| #define | QPRC_PC_OVERFLOW_INT 0 |
| #define | QPRC_PC_UNDERFLOW_INT 1 |
| #define | QPRC_PC_ZERO_INDEX_INT 2 |
Typedefs | |
| typedef enum en_qprc_instance_index | en_qprc_instance_index_t |
| Enumeration to define an index for each QPRC instance. More... | |
| typedef enum en_qprc_pcmode | en_qprc_pcmode_t |
| Enumeration to define position counter mode. More... | |
| typedef enum en_qprc_rcmode | en_qprc_rcmode_t |
| Enumeration to define revolution counter mode. More... | |
| typedef enum en_qprc_zinedge | en_qprc_zinedge_t |
| Enumeration to define ZIN valid edge. More... | |
| typedef enum en_qprc_binedge | en_qprc_binedge_t |
| Enumeration to define BIN valid edge. More... | |
| typedef enum en_qprc_ainedge | en_qprc_ainedge_t |
| Enumeration to define AIN valid edge. More... | |
| typedef enum en_qprc_pcresetmask | en_qprc_pcresetmask_t |
| Enumeration to define reset mask times of position counter. More... | |
| typedef enum en_qprc_compmode | en_qprc_compmode_t |
| Enumeration to define compare object of QPRCR register. More... | |
| typedef enum en_qprc_int | en_qprc_int_t |
| Enumeration to define QPRC interrupt type. More... | |
| typedef struct stc_qprc_int_sel | stc_qprc_int_sel_t |
| Enumeration to define QPRC interrupt selection. More... | |
| typedef struct stc_qprc_int_cb | stc_qprc_int_cb_t |
| Enumeration to define QPRC interrupt callback function. More... | |
| typedef enum en_qprc_filter_width | en_qprc_filter_width_t |
| Enumeration to define QPRC filter width. More... | |
| typedef struct stc_qprc_filter | stc_qprc_filter_t |
| Structure to configuration QPRC filter. More... | |
| typedef struct stc_qprc_config | stc_qprc_config_t |
| Structure to configuration QPRC. More... | |
| typedef struct stc_qprc_intern_data | stc_qprc_intern_data_t |
| Structure of QPRC internal data. More... | |
| typedef struct stc_qprc_instance_data | stc_qprc_instance_data_t |
| Structure of QPRC instance data. More... | |
Functions | |
| en_result_t | Qprc_Init (volatile FM4_QPRC_TypeDef *pstcQprc, stc_qprc_config_t *pstcConfig) |
| Initialize QPRC. More... | |
| en_result_t | Qprc_StopPcCount (volatile FM4_QPRC_TypeDef *pstcQprc) |
| Enable Position Counter. More... | |
| en_result_t | Qprc_RestartPcCount (volatile FM4_QPRC_TypeDef *pstcQprc) |
| Disable Position Counter. More... | |
| en_result_t | Qprc_SetPcCount (volatile FM4_QPRC_TypeDef *pstcQprc, uint16_t u16PcValue) |
| Set count value of Position counter. More... | |
| uint16_t | Qprc_GetPcCount (volatile FM4_QPRC_TypeDef *pstcQprc) |
| Get count value of Position counter. More... | |
| en_result_t | Qprc_SetRcCount (volatile FM4_QPRC_TypeDef *pstcQprc, uint16_t u16RcValue) |
| Set count value of Revolution Counter. More... | |
| uint16_t | Qprc_GetRcCount (volatile FM4_QPRC_TypeDef *pstcQprc) |
| Get count value of Revolution Counter. More... | |
| en_result_t | Qprc_SetPcMaxValue (volatile FM4_QPRC_TypeDef *pstcQprc, uint16_t u16PcMaxValue) |
| Set maximum count value of Position Counter. More... | |
| uint16_t | Qprc_GetPcMaxValue (volatile FM4_QPRC_TypeDef *pstcQprc) |
| Get maximum count value of Position Counter. More... | |
| en_result_t | Qprc_SetPcCompareValue (volatile FM4_QPRC_TypeDef *pstcQprc, uint16_t u16PcValue) |
| Set compare value of Position counter. More... | |
| uint16_t | Qprc_GetPcCompareValue (volatile FM4_QPRC_TypeDef *pstcQprc) |
| Get compare value of Position counter. More... | |
| en_result_t | Qprc_SetPcRcCompareValue (volatile FM4_QPRC_TypeDef *pstcQprc, uint16_t u16PcRcValue) |
| Set compare value of Position and Revolution Counter. More... | |
| uint16_t | Qprc_GetPcRcCompareValue (volatile FM4_QPRC_TypeDef *pstcQprc) |
| Get compare value of Position and Revolution Counter. More... | |
| en_result_t | Qprc_ConfigPcMode (volatile FM4_QPRC_TypeDef *pstcQprc, en_qprc_pcmode_t enMode) |
| Set Position Counter mode. More... | |
| en_result_t | Qprc_ConfigRcMode (volatile FM4_QPRC_TypeDef *pstcQprc, en_qprc_rcmode_t enMode) |
| Set Revolution Counter mode. More... | |
| en_result_t | Qprc_EnableInt (volatile FM4_QPRC_TypeDef *pstcQprc, stc_qprc_int_sel_t *pstcIntSel, stc_qprc_int_cb_t *pstcIntCallback) |
| Enable PC match interrupt. More... | |
| en_result_t | Qprc_DisableInt (volatile FM4_QPRC_TypeDef *pstcQprc, stc_qprc_int_sel_t *pstcIntSel) |
| Disable PC match interrupt. More... | |
| en_int_flag_t | Qprc_GetIntFlag (volatile FM4_QPRC_TypeDef *pstcQprc, en_qprc_int_t enIntType) |
| Get interrupt flag of QPRC. More... | |
| en_result_t | Qprc_ClrIntFlag (volatile FM4_QPRC_TypeDef *pstcQprc, en_qprc_int_t enIntType) |
| Clear interrupt flag of QPRC. More... | |
| en_stat_flag_t | Qprc_GetPcOfUfDir (volatile FM4_QPRC_TypeDef *pstcQprc) |
| Get last position counter flow direction. More... | |
| en_stat_flag_t | Qprc_GetPcDir (volatile FM4_QPRC_TypeDef *pstcQprc) |
| Get last position counter direction. More... | |
| void | Qprc_IrqHandler (volatile FM4_QPRC_TypeDef *pstcQprc, stc_qprc_intern_data_t *pstcQprcInternData) |
| QPRC instance interrupt service routine. More... | |
Variables | |
| stc_qprc_instance_data_t | m_astcQprcInstanceDataLut [] |
| Look-up table for all enabled MFS instances and their internal data. More... | |
Headerfile for QPRC functions
History:
Definition in file qprc.h.