summaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2018-06-01 13:32:45 -0700
committerScott Shawcroft <scott.shawcroft@gmail.com>2018-06-01 13:32:45 -0700
commitbf1f0b3d117dd772ae47b6899f49d8caf1e66947 (patch)
tree8be125e82081a85802644428208fca086182478d /ports
parent6479cb08060d7fb29b9189430a1ee8d105d37b26 (diff)
Turn off timer on AudioOut deinit.
Thanks to @sommersoft for spotting the error. Fixes #850
Diffstat (limited to 'ports')
-rw-r--r--ports/atmel-samd/common-hal/audioio/AudioOut.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/atmel-samd/common-hal/audioio/AudioOut.c b/ports/atmel-samd/common-hal/audioio/AudioOut.c
index 6971c020b..331ae9c9b 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