34 #if defined(LETIMER_COUNT) && (LETIMER_COUNT > 0)
60 #define LETIMER_COMP_REG_VALID(reg) (((reg) <= 1))
63 #define LETIMER_REF_VALID(ref) ((ref) == LETIMER0)
66 #define LETIMER_REP_REG_VALID(reg) (((reg) <= 1))
77 #if defined(_EFM32_GECKO_FAMILY)
96 #if defined(_LETIMER_FREEZE_MASK)
99 if (letimer->FREEZE & LETIMER_FREEZE_REGFREEZE)
133 EFM_ASSERT(LETIMER_REF_VALID(letimer) && LETIMER_COMP_REG_VALID(comp));
139 ret = letimer->
COMP0;
143 ret = letimer->
COMP1;
180 volatile uint32_t *compReg;
182 EFM_ASSERT(LETIMER_REF_VALID(letimer)
183 && LETIMER_COMP_REG_VALID(comp)
192 compReg = &(letimer->
COMP0);
196 compReg = &(letimer->
COMP1);
204 #if defined(_EFM32_GECKO_FAMILY)
206 regSync(letimer, comp ? LETIMER_SYNCBUSY_COMP1 : LETIMER_SYNCBUSY_COMP0);
233 EFM_ASSERT(LETIMER_REF_VALID(letimer));
235 #if defined(_EFM32_GECKO_FAMILY)
250 #if defined(_LETIMER_FREEZE_MASK)
294 letimer->FREEZE = LETIMER_FREEZE_REGFREEZE;
331 EFM_ASSERT(LETIMER_REF_VALID(letimer));
336 #if defined(_EFM32_GECKO_FAMILY)
350 #if defined(LETIMER_CTRL_RTCC0TEN)
351 if (init->rtcComp0Enable)
353 tmp |= LETIMER_CTRL_RTCC0TEN;
356 if (init->rtcComp1Enable)
358 tmp |= LETIMER_CTRL_RTCC1TEN;
386 #if defined(_EFM32_GECKO_FAMILY)
388 regSync(letimer, LETIMER_SYNCBUSY_CTRL);
395 #if defined(_EFM32_GECKO_FAMILY)
421 EFM_ASSERT(LETIMER_REF_VALID(letimer) && LETIMER_REP_REG_VALID(rep));
468 volatile uint32_t *repReg;
469 #if defined(_EFM32_GECKO_FAMILY)
472 EFM_ASSERT(LETIMER_REF_VALID(letimer)
473 && LETIMER_REP_REG_VALID(rep)
482 repReg = &(letimer->
REP0);
483 #if defined(_EFM32_GECKO_FAMILY)
484 syncbusy = LETIMER_SYNCBUSY_REP0;
489 repReg = &(letimer->
REP1);
490 #if defined(_EFM32_GECKO_FAMILY)
491 syncbusy = LETIMER_SYNCBUSY_REP1;
500 #if defined(_EFM32_GECKO_FAMILY)
502 regSync(letimer, syncbusy);
522 #if defined(_LETIMER_FREEZE_MASK)
524 LETIMER_FreezeEnable(letimer,
true);
539 #if defined(_LETIMER_FREEZE_MASK)
541 LETIMER_FreezeEnable(letimer,
false);
Clock management unit (CMU) API.
#define _LETIMER_COMP0_RESETVALUE
void LETIMER_Enable(LETIMER_TypeDef *letimer, bool enable)
Start/stop LETIMER.
void LETIMER_Init(LETIMER_TypeDef *letimer, const LETIMER_Init_TypeDef *init)
Initialize LETIMER.
uint32_t LETIMER_CompareGet(LETIMER_TypeDef *letimer, unsigned int comp)
Get LETIMER compare register value.
Emlib peripheral API "assert" implementation.
#define LETIMER_CTRL_DEBUGRUN
#define _LETIMER_CTRL_REPMODE_SHIFT
#define _LETIMER_COMP0_COMP0_MASK
LETIMER_UFOA_TypeDef ufoa1
uint32_t LETIMER_RepeatGet(LETIMER_TypeDef *letimer, unsigned int rep)
Get LETIMER repeat register value.
#define _LETIMER_CTRL_UFOA0_SHIFT
Low Energy Timer (LETIMER) peripheral API.
#define LETIMER_CTRL_BUFTOP
void LETIMER_Reset(LETIMER_TypeDef *letimer)
Reset LETIMER to same state as after a HW reset.
#define LETIMER_CTRL_COMP0TOP
void LETIMER_RepeatSet(LETIMER_TypeDef *letimer, unsigned int rep, uint32_t value)
Set LETIMER repeat counter register value.
#define _LETIMER_COMP0_COMP0_SHIFT
LETIMER_UFOA_TypeDef ufoa0
#define LETIMER_SYNCBUSY_CMD
#define LETIMER_CMD_START
#define _LETIMER_REP0_REP0_SHIFT
#define _LETIMER_CTRL_RESETVALUE
#define LETIMER_STATUS_RUNNING
#define _LETIMER_CTRL_UFOA1_SHIFT
#define _LETIMER_REP1_RESETVALUE
#define _LETIMER_IFC_MASK
void LETIMER_CompareSet(LETIMER_TypeDef *letimer, unsigned int comp, uint32_t value)
Set LETIMER compare register value.
#define _LETIMER_REP0_RESETVALUE
LETIMER_RepeatMode_TypeDef repMode
#define LETIMER_CTRL_OPOL0
#define _LETIMER_IEN_RESETVALUE
#define _LETIMER_REP0_REP0_MASK
#define LETIMER_CMD_CLEAR
#define LETIMER_CTRL_OPOL1
#define _LETIMER_COMP1_RESETVALUE