From bf1f0b3d117dd772ae47b6899f49d8caf1e66947 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 1 Jun 2018 13:32:45 -0700 Subject: [PATCH] Turn off timer on AudioOut deinit. Thanks to @sommersoft for spotting the error. Fixes #850 --- ports/atmel-samd/common-hal/audioio/AudioOut.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/atmel-samd/common-hal/audioio/AudioOut.c b/ports/atmel-samd/common-hal/audioio/AudioOut.c index 6971c020b4..331ae9c9b5 100644 --- a/ports/atmel-samd/common-hal/audioio/AudioOut.c +++ b/ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -240,6 +240,8 @@ void common_hal_audioio_audioout_deinit(audioio_audioout_obj_t* self) { disable_event_channel(self->tc_to_dac_event_channel); + tc_set_enable(tc_insts[self->tc_index], false); + reset_pin(self->left_channel->pin); self->left_channel = mp_const_none; #ifdef SAMD51