37 #if defined(PCNT_COUNT) && (PCNT_COUNT > 0)
59 #if defined(_EFM32_GECKO_FAMILY)
60 #define PCNT0_CNT_SIZE (8)
62 #define PCNT0_CNT_SIZE (16)
67 #define PCNT1_CNT_SIZE (8)
72 #define PCNT2_CNT_SIZE (8)
95 #if defined(_PCNT_CTRL_MODE_OVSQUAD1X)
108 #if defined(_PCNT_CTRL_CNTEV_MASK)
129 #if defined(_PCNT_INPUT_MASK)
137 #if defined(PCNT_INPUT_S0PRSSEL_PRSCH4)
140 #if defined(PCNT_INPUT_S0PRSSEL_PRSCH5)
143 #if defined(PCNT_INPUT_S0PRSSEL_PRSCH6)
146 #if defined(PCNT_INPUT_S0PRSSEL_PRSCH7)
149 #if defined(PCNT_INPUT_S0PRSSEL_PRSCH8)
152 #if defined(PCNT_INPUT_S0PRSSEL_PRSCH9)
155 #if defined(PCNT_INPUT_S0PRSSEL_PRSCH10)
158 #if defined(PCNT_INPUT_S0PRSSEL_PRSCH11)
208 #if defined(PCNT_CTRL_HYST)
235 #if !defined(PCNT_CTRL_HYST)
237 #define PCNT_INIT_DEFAULT \
240 _PCNT_CNT_RESETVALUE, \
241 _PCNT_TOP_RESETVALUE, \
248 #define PCNT_INIT_DEFAULT \
251 _PCNT_CNT_RESETVALUE, \
252 _PCNT_TOP_RESETVALUE, \
265 #if defined(PCNT_OVSCFG_FILTLEN_DEFAULT)
280 #if defined(PCNT_OVSCFG_FILTLEN_DEFAULT)
281 #define PCNT_FILTER_DEFAULT \
288 #if defined(PCNT_CTRL_TCCMODE_DEFAULT)
358 #define PCNT_TCC_DEFAULT \
390 #if defined(_PCNT_AUXCNT_MASK)
440 #if defined(PCNT_OVSCFG_FILTLEN_DEFAULT)
444 #if defined(_PCNT_INPUT_MASK)
450 #if defined(PCNT_CTRL_TCCMODE_DEFAULT)
556 return pcnt->
IF & ien;
__STATIC_INLINE uint32_t PCNT_TopBufferGet(PCNT_TypeDef *pcnt)
Get pulse counter top buffer value.
__STATIC_INLINE void PCNT_CounterSet(PCNT_TypeDef *pcnt, uint32_t count)
Set counter value.
void PCNT_CounterTopSet(PCNT_TypeDef *pcnt, uint32_t count, uint32_t top)
Set counter and top values.
#define _PCNT_CTRL_MODE_EXTCLKQUAD
PCNT_TCCPresc_Typedef prescaler
void PCNT_Enable(PCNT_TypeDef *pcnt, PCNT_Mode_TypeDef mode)
Set PCNT operational mode.
#define _PCNT_CTRL_CNTEV_NONE
#define _PCNT_CTRL_TCCPRESC_DIV8
__STATIC_INLINE void PCNT_IntEnable(PCNT_TypeDef *pcnt, uint32_t flags)
Enable one or more PCNT interrupts.
#define _PCNT_CTRL_TCCMODE_LFA
#define _PCNT_CTRL_MODE_OVSQUAD4X
void PCNT_TopSet(PCNT_TypeDef *pcnt, uint32_t val)
Set top value.
void PCNT_PRSInputEnable(PCNT_TypeDef *pcnt, PCNT_PRSInput_TypeDef prsInput, bool enable)
Enable/disable the selected PRS input of PCNT.
__STATIC_INLINE void PCNT_IntClear(PCNT_TypeDef *pcnt, uint32_t flags)
Clear one or more pending PCNT interrupts.
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
PCNT_TCCMode_TypeDef mode
#define _PCNT_CTRL_MODE_OVSSINGLE
PCNT_CntEvent_TypeDef cntEvent
#define _PCNT_CTRL_CNTEV_UP
__STATIC_INLINE void PCNT_IntDisable(PCNT_TypeDef *pcnt, uint32_t flags)
Disable one or more PCNT interrupts.
#define _PCNT_CTRL_CNTEV_DOWN
#define _PCNT_CTRL_TCCCOMP_LTOE
__STATIC_INLINE uint32_t PCNT_CounterGet(PCNT_TypeDef *pcnt)
Get pulse counter value.
PCNT_CntEvent_TypeDef auxCntEvent
__STATIC_INLINE void PCNT_IntSet(PCNT_TypeDef *pcnt, uint32_t flags)
Set one or more pending PCNT interrupts from SW.
#define _PCNT_CTRL_TCCPRESC_DIV4
__STATIC_INLINE uint32_t PCNT_IntGetEnabled(PCNT_TypeDef *pcnt)
Get enabled and pending PCNT interrupt flags.
void PCNT_CounterReset(PCNT_TypeDef *pcnt)
Reset PCNT counters and TOP register.
void PCNT_Init(PCNT_TypeDef *pcnt, const PCNT_Init_TypeDef *init)
Init pulse counter.
PCNT_PRSSel_TypeDef s1PRS
#define _PCNT_CTRL_MODE_EXTCLKSINGLE
PCNT_PRSSel_TypeDef s0PRS
PCNT_PRSSel_TypeDef tccPRS
void PCNT_FilterConfiguration(PCNT_TypeDef *pcnt, const PCNT_Filter_TypeDef *config, bool enable)
Set filter configuration.
void PCNT_TopBufferSet(PCNT_TypeDef *pcnt, uint32_t val)
Set top buffer value.
__STATIC_INLINE uint32_t PCNT_TopGet(PCNT_TypeDef *pcnt)
Get pulse counter top value.
#define _PCNT_CTRL_TCCMODE_DISABLED
__STATIC_INLINE uint32_t PCNT_IntGet(PCNT_TypeDef *pcnt)
Get pending PCNT interrupt flags.
#define _PCNT_CTRL_TCCMODE_PRS
#define _PCNT_CTRL_CNTEV_BOTH
#define _PCNT_CTRL_MODE_OVSQUAD2X
__STATIC_INLINE uint32_t PCNT_AuxCounterGet(PCNT_TypeDef *pcnt)
Get auxiliary counter value.
void PCNT_FreezeEnable(PCNT_TypeDef *pcnt, bool enable)
PCNT register synchronization freeze control.
#define _PCNT_CTRL_TCCCOMP_GTOE
#define _PCNT_CTRL_MODE_DISABLE
#define _PCNT_CTRL_TCCPRESC_DIV1
void PCNT_TCCConfiguration(PCNT_TypeDef *pcnt, const PCNT_TCC_TypeDef *config)
Set Triggered Compare and Clear configuration.
PCNT_TCCComp_Typedef compare
void PCNT_Reset(PCNT_TypeDef *pcnt)
Reset PCNT to same state as after a HW reset.
#define _PCNT_CTRL_TCCCOMP_RANGE
#define _PCNT_CTRL_MODE_OVSQUAD1X
#define _PCNT_CTRL_TCCPRESC_DIV2