void nrf_drv_clock_uninit(void) { ASSERT(m_clock_cb.module_initialized); #ifndef SOFTDEVICE_PRESENT nrf_drv_common_irq_disable(POWER_CLOCK_IRQn); nrf_clock_int_disable(0xFFFFFFFF); lfclk_stop(); #endif hfclk_stop(); m_clock_cb.module_initialized = false; }
void nrf_drv_clock_uninit(void) { ASSERT(m_clock_cb.module_initialized); nrf_drv_common_clock_irq_disable(); nrf_clock_int_disable(0xFFFFFFFF); lfclk_stop(); hfclk_stop(); m_clock_cb.module_initialized = false; NRF_LOG_INFO("Uninitialized.\r\n"); }
void nrf_drv_clock_lfclk_release(void) { ASSERT(m_clock_cb.module_initialized); ASSERT(m_clock_cb.lfclk_requests > 0); CRITICAL_REGION_ENTER(); --(m_clock_cb.lfclk_requests); if (m_clock_cb.lfclk_requests == 0) { lfclk_stop(); } CRITICAL_REGION_EXIT(); }
void nrf_drv_clock_lfclk_release(void) { ASSERT(m_clock_cb.module_initialized); #ifndef SOFTDEVICE_PRESENT ASSERT(m_clock_cb.lfclk_requests > 0); CRITICAL_REGION_ENTER(); m_clock_cb.lfclk_requests--; if (m_clock_cb.lfclk_requests == 0) { lfclk_stop(); m_clock_cb.lfclk_on = false; m_clock_cb.p_lf_head = NULL; } CRITICAL_REGION_EXIT(); #endif // SOFTDEVICE_PRESENT }