From b2dcc5bb6c50f9b6eb3c294c98df8a5880167fd8 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 29 Sep 2017 10:38:11 -0400 Subject: [PATCH] reset pins on PDMIn deinit(). Fixes #275. --- atmel-samd/common-hal/audiobusio/PDMIn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/atmel-samd/common-hal/audiobusio/PDMIn.c b/atmel-samd/common-hal/audiobusio/PDMIn.c index 555601c9dd..11411ee3d4 100644 --- a/atmel-samd/common-hal/audiobusio/PDMIn.c +++ b/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -148,6 +148,8 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t* self, void common_hal_audiobusio_pdmin_deinit(audiobusio_pdmin_obj_t* self) { i2s_disable(&self->i2s_instance); i2s_reset(&self->i2s_instance); + reset_pin(self->clock_pin->pin); + reset_pin(self->data_pin->pin); } uint8_t common_hal_audiobusio_pdmin_get_bit_depth(audiobusio_pdmin_obj_t* self) {