nrf: PWMAudioOut: deactivate PWM when deinitting self
.. otherwise, when an AudioPWMOut object was deinitted without being explicitly stop()ped, it would use up a slot in active_audio[]; the 5th iteration would create a non-working audio object which would just buzz instead of playing the right thing. Closes: #2203
This commit is contained in:
parent
ef459326cb
commit
fae6e29546
@ -194,6 +194,8 @@ void common_hal_audiopwmio_pwmaudioout_deinit(audiopwmio_pwmaudioout_obj_t* self
|
||||
if (common_hal_audiopwmio_pwmaudioout_deinited(self)) {
|
||||
return;
|
||||
}
|
||||
deactivate_audiopwmout_obj(self);
|
||||
|
||||
// TODO: ramp the pwm down from quiescent value to 0
|
||||
self->pwm->ENABLE = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user