From c5d77f0e7ee14c051aa4504d61506e4f4ff4b151 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Sat, 31 Dec 2016 17:05:32 +0100 Subject: [PATCH] nrf5/hal: Moving enablement of PWM task from init to a start function. Also activating code in stop function to stop the PWM. --- nrf5/hal/hal_pwm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nrf5/hal/hal_pwm.c b/nrf5/hal/hal_pwm.c index cf678c0ff2..6363b6a32c 100644 --- a/nrf5/hal/hal_pwm.c +++ b/nrf5/hal/hal_pwm.c @@ -72,15 +72,14 @@ void hal_pwm_init(NRF_PWM_Type * p_instance, hal_pwm_init_t const * p_pwm_init) p_instance->SEQ[0].REFRESH = 0; p_instance->SEQ[0].ENDDELAY = 0; - p_instance->TASKS_SEQSTART[0] = 1; } void hal_pwm_start(NRF_PWM_Type * p_instance) { - // p_instance->TASKS_SEQSTART[0] = 1; + p_instance->TASKS_SEQSTART[0] = 1; } void hal_pwm_stop(NRF_PWM_Type * p_instance) { - // p_instance->TASKS_STOP = 1; + p_instance->TASKS_STOP = 1; } void hal_pwm_freq_set(NRF_PWM_Type * p_instance, uint16_t freq) {