25 static void (*rtcCb)(void);
26 static uint8_t rtcInitialized = 0;
27 static volatile bool rtcDelayComplete;
28 static uint32_t rtcFreq;
33 static void DelayCB(
void)
35 rtcDelayComplete =
true;
87 rtcDelayComplete =
false;
88 RTCDRV_Trigger(msec, DelayCB);
90 while (!rtcDelayComplete)
102 void RTC_IRQHandler(
void)
126 void RTCDRV_Trigger(uint32_t msec,
void (*cb)(
void))
Clock management unit (CMU) API.
void CMU_ClockSelectSet(CMU_Clock_TypeDef clock, CMU_Select_TypeDef ref)
Select reference clock/oscillator used for a clock branch.
__STATIC_INLINE void RTC_IntDisable(uint32_t flags)
Disable one or more RTC interrupts.
__STATIC_INLINE void RTC_IntClear(uint32_t flags)
Clear one or more pending RTC interrupts.
void EMU_EnterEM2(bool restore)
Enter energy mode 2 (EM2).
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
void RTC_CompareSet(unsigned int comp, uint32_t value)
Set RTC compare register value.
uint32_t CMU_ClkDiv_TypeDef
Real Time Counter (RTC) driver prototypes and definitions.
Ecode_t RTCDRV_Delay(uint32_t ms)
Millisecond delay function.
__STATIC_INLINE void RTC_IntEnable(uint32_t flags)
Enable one or more RTC interrupts.
void RTC_Init(const RTC_Init_TypeDef *init)
Initialize RTC.
void CMU_ClockEnable(CMU_Clock_TypeDef clock, bool enable)
Enable/disable a clock.
Real Time Counter (RTC) peripheral API.
Energy management unit (EMU) peripheral API.
void RTC_Enable(bool enable)
Enable/disable RTC.
uint32_t CMU_ClockFreqGet(CMU_Clock_TypeDef clock)
Get clock frequency for a clock point.
void CMU_ClockDivSet(CMU_Clock_TypeDef clock, CMU_ClkDiv_TypeDef div)
Set clock divisor/prescaler.