reset pins on PDMIn deinit(). Fixes #275.

This commit is contained in:
Dan Halbert 2017-09-29 10:38:11 -04:00 committed by Scott Shawcroft
parent 3ad01ddb04
commit b2dcc5bb6c

View File

@ -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) {