EFM32 Wonder Gecko Software Documentation  efm32wg-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 /***************************************************************************/
51 void CRYOTIMER_Init(const CRYOTIMER_Init_TypeDef *init)
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);
58  CRYOTIMER_EM4WakeupEnable(init->em4Wakeup);
59 }
60 
61 #endif /* defined(CRYOTIMER_PRESENT) && (CRYOTIMER_COUNT > 0) */
RAM and peripheral bit-field set and clear API.
Ultra Low Energy Timer/Counter (CRYOTIMER) peripheral API.