void nrf_drv_lpcomp_uninit(void) { ASSERT(m_state != NRF_DRV_STATE_UNINITIALIZED); nrf_drv_common_irq_disable(LPCOMP_IRQn); nrf_drv_lpcomp_disable(); #if NRF_MODULE_ENABLED(PERIPHERAL_RESOURCE_SHARING) nrf_drv_common_per_res_release(NRF_LPCOMP); #endif m_state = NRF_DRV_STATE_UNINITIALIZED; m_lpcomp_events_handler = NULL; NRF_LOG_INFO("Uninitialized.\r\n"); }
void nrf_drv_spis_uninit(nrf_drv_spis_t const * const p_instance) { spis_cb_t * p_cb = &m_cb[p_instance->instance_id]; ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); NRF_SPIS_Type * p_spis = p_instance->p_reg; #define DISABLE_ALL 0xFFFFFFFF nrf_spis_disable(p_spis); nrf_drv_common_irq_disable(p_instance->irq); nrf_spis_int_disable(p_spis, DISABLE_ALL); #undef DISABLE_ALL #if PERIPHERAL_RESOURCE_SHARING_ENABLED nrf_drv_common_per_res_release(p_spis); #endif p_cb->state = NRF_DRV_STATE_UNINITIALIZED; }