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

Function BURTC_Enable

bsp/efm32/Libraries/emlib/inc/em_burtc.h:284–297  ·  view source on GitHub ↗

/ * @brief * Enable or Disable BURTC peripheral reset and start counter * @param[in] enable * If true; asserts reset to BURTC, halts counter, if false; deassert reset ******************************************************************************/

Source from the content-addressed store, hash-verified

282 * If true; asserts reset to BURTC, halts counter, if false; deassert reset
283 ******************************************************************************/
284__STATIC_INLINE void BURTC_Enable(bool enable)
285{
286 /* Note! If mode is disabled, BURTC counter will not start */
287 EFM_ASSERT(((enable == true) && ((BURTC->CTRL & _BURTC_CTRL_MODE_MASK) != BURTC_CTRL_MODE_DISABLE))
288 || (enable == false));
289 if( enable )
290 {
291 BITBAND_Peripheral(&BURTC->CTRL, _BURTC_CTRL_RSTEN_SHIFT, 0);
292 }
293 else
294 {
295 BITBAND_Peripheral(&BURTC->CTRL, _BURTC_CTRL_RSTEN_SHIFT, 1);
296 }
297}
298
299
300/***************************************************************************//**

Callers 1

BURTC_InitFunction · 0.85

Calls 1

BITBAND_PeripheralFunction · 0.85

Tested by

no test coverage detected