void nrf_drv_pwm_uninit(nrf_drv_pwm_t const * const p_instance) { pwm_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; ASSERT(p_cb->state != NRF_DRV_STATE_UNINITIALIZED); nrf_drv_common_irq_disable(nrf_drv_get_IRQn(p_instance->p_registers)); nrf_pwm_disable(p_instance->p_registers); p_cb->state = NRF_DRV_STATE_UNINITIALIZED; }
void nrfx_pwm_uninit(nrfx_pwm_t const * const p_instance) { pwm_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx]; NRFX_ASSERT(p_cb->state != NRFX_DRV_STATE_UNINITIALIZED); NRFX_IRQ_DISABLE(nrfx_get_irq_number(p_instance->p_registers)); #if defined(USE_DMA_ISSUE_WORKAROUND) NRFX_IRQ_DISABLE(DMA_ISSUE_EGU_IRQn); #endif nrf_pwm_disable(p_instance->p_registers); p_cb->state = NRFX_DRV_STATE_UNINITIALIZED; }