void packet_timer_event_stop(void) { hfclk_stop(); NRF_TIMER0->TASKS_STOP = 1; NRF_TIMER0->TASKS_CLEAR = 1; }
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_hfclk_release(void) { ASSERT(m_clock_cb.module_initialized); ASSERT(m_clock_cb.hfclk_requests > 0); CRITICAL_REGION_ENTER(); --(m_clock_cb.hfclk_requests); if (m_clock_cb.hfclk_requests == 0) { hfclk_stop(); } CRITICAL_REGION_EXIT(); }
void nrf_drv_clock_hfclk_release(void) { ASSERT(m_clock_cb.module_initialized); ASSERT(m_clock_cb.hfclk_requests > 0); //disable interrupts CLOCK or SoftDevice events CRITICAL_REGION_ENTER(); m_clock_cb.hfclk_requests--; if (m_clock_cb.hfclk_requests == 0) { hfclk_stop(); m_clock_cb.hfclk_on = false; m_clock_cb.p_hf_head = NULL; } CRITICAL_REGION_EXIT(); //enable interrupts CLOCK or SoftDevice events }