Two tweaks to mclk

This commit is contained in:
Scott Shawcroft 2023-08-17 14:28:33 -07:00
parent 8c5c73df38
commit f93022b142
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
2 changed files with 6 additions and 4 deletions

View File

@ -131,10 +131,12 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) {
common_hal_reset_pin(self->data); common_hal_reset_pin(self->data);
self->data = NULL; self->data = NULL;
IOMUXC_GPR->GPR1 &= ~(IOMUXC_GPR_GPR1_SAI1_MCLK_DIR_MASK << (self->instance - 1)); if (self->mclk != NULL) {
IOMUXC_GPR->GPR1 &= ~(IOMUXC_GPR_GPR1_SAI1_MCLK_DIR_MASK << (self->instance - 1));
common_hal_reset_pin(self->mclk); common_hal_reset_pin(self->mclk);
self->mclk = NULL; self->mclk = NULL;
}
} }
void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self,

View File

@ -44,7 +44,7 @@
//| word_select: microcontroller.Pin, //| word_select: microcontroller.Pin,
//| data: microcontroller.Pin, //| data: microcontroller.Pin,
//| *, //| *,
//| main_clock: microcontroller.Pin = None, //| main_clock: Optional[microcontroller.Pin] = None,
//| left_justified: bool = False //| left_justified: bool = False
//| ) -> None: //| ) -> None:
//| """Create a I2SOut object associated with the given pins. //| """Create a I2SOut object associated with the given pins.