set instance->playing to true/false when enabling/disbling the pwm playback
@@ -509,6 +509,7 @@ nrf52_pwm_enable(struct pwm_dev *dev)
&instance->config,
instance->internal_handler);
play_current_config(instance);
+ instance->playing = true;
return (0);
}
@@ -545,6 +546,7 @@ nrf52_pwm_disable(struct pwm_dev *dev)
if (!nrfx_pwm_stop(&instances[inst_id].drv_instance, true)) {
return (-EINVAL);
}
+ instances[inst_id].playing = false;
nrfx_pwm_uninit(&instances[inst_id].drv_instance);
return (0);
