MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / RTC_Enable

Function RTC_Enable

bsp/efm32/Libraries/emlib/src/em_rtc.c:211–219  ·  view source on GitHub ↗

/ * @brief * Enable/disable RTC. * * @note * The enabling/disabling of the RTC modifies the RTC CTRL register which * requires synchronization into the low frequency domain. If this register is * modified before a previous update to the same register has completed, this * function will stall until the previous synchronization has completed. This * only applies to the Gecko Fami

Source from the content-addressed store, hash-verified

209 * true to enable counting, false to disable.
210 ******************************************************************************/
211void RTC_Enable(bool enable)
212{
213#if defined(_EFM32_GECKO_FAMILY)
214 /* LF register about to be modified require sync. busy check */
215 RTC_Sync(RTC_SYNCBUSY_CTRL);
216#endif
217
218 BITBAND_Peripheral(&(RTC->CTRL), _RTC_CTRL_EN_SHIFT, (unsigned int) enable);
219}
220
221
222/***************************************************************************//**

Callers 1

RTC_CounterResetFunction · 0.70

Calls 2

RTC_SyncFunction · 0.85
BITBAND_PeripheralFunction · 0.85

Tested by

no test coverage detected