EFR32 Mighty Gecko 13 Software Documentation  efr32mg13-doc-5.1.2
em_cryotimer.c
Go to the documentation of this file.
1 /***************************************************************************/
33 #include "em_cryotimer.h"
34 #include "em_bus.h"
35 
36 #if defined(CRYOTIMER_PRESENT) && (CRYOTIMER_COUNT == 1)
37 
38 /***************************************************************************/
52 {
53  CRYOTIMER->PERIODSEL = (uint32_t)init->period & _CRYOTIMER_PERIODSEL_MASK;
54  CRYOTIMER->CTRL = ((uint32_t)init->enable << _CRYOTIMER_CTRL_EN_SHIFT)
55  | ((uint32_t)init->debugRun << _CRYOTIMER_CTRL_DEBUGRUN_SHIFT)
56  | ((uint32_t)init->osc << _CRYOTIMER_CTRL_OSCSEL_SHIFT)
57  | ((uint32_t)init->presc << _CRYOTIMER_CTRL_PRESC_SHIFT);
59 }
60 
61 #endif /* defined(CRYOTIMER_PRESENT) && (CRYOTIMER_COUNT > 0) */
RAM and peripheral bit-field set and clear API.
#define _CRYOTIMER_CTRL_OSCSEL_SHIFT
__STATIC_INLINE void CRYOTIMER_EM4WakeupEnable(bool enable)
Enable/disable EM4 wakeup capability.
Definition: em_cryotimer.h:367
CRYOTIMER_Period_TypeDef period
Definition: em_cryotimer.h:200
#define _CRYOTIMER_CTRL_DEBUGRUN_SHIFT
void CRYOTIMER_Init(const CRYOTIMER_Init_TypeDef *init)
Initialize the CRYOTIMER.
Definition: em_cryotimer.c:51
#define CRYOTIMER
CRYOTIMER_Osc_TypeDef osc
Definition: em_cryotimer.h:194
CRYOTIMER_Presc_TypeDef presc
Definition: em_cryotimer.h:197
#define _CRYOTIMER_CTRL_EN_SHIFT
Ultra Low Energy Timer/Counter (CRYOTIMER) peripheral API.
#define _CRYOTIMER_CTRL_PRESC_SHIFT
#define _CRYOTIMER_PERIODSEL_MASK