nrf5/hal: Moving enablement of PWM task from init to a start function. Also activating code in stop function to stop the PWM.

This commit is contained in:
Glenn Ruben Bakke 2016-12-31 17:05:32 +01:00
parent 38607ee445
commit c5d77f0e7e
1 changed files with 2 additions and 3 deletions

View File

@ -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) {