File tree Expand file tree Collapse file tree
ports/mimxrt10xx/common-hal/audiobusio
shared-bindings/audiobusio Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,10 +131,12 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) {
131131 common_hal_reset_pin (self -> data );
132132 self -> data = NULL ;
133133
134- IOMUXC_GPR -> GPR1 &= ~(IOMUXC_GPR_GPR1_SAI1_MCLK_DIR_MASK << (self -> instance - 1 ));
134+ if (self -> mclk != NULL ) {
135+ IOMUXC_GPR -> GPR1 &= ~(IOMUXC_GPR_GPR1_SAI1_MCLK_DIR_MASK << (self -> instance - 1 ));
135136
136- common_hal_reset_pin (self -> mclk );
137- self -> mclk = NULL ;
137+ common_hal_reset_pin (self -> mclk );
138+ self -> mclk = NULL ;
139+ }
138140}
139141
140142void common_hal_audiobusio_i2sout_play (audiobusio_i2sout_obj_t * self ,
Original file line number Diff line number Diff line change 4444//| word_select: microcontroller.Pin,
4545//| data: microcontroller.Pin,
4646//| *,
47- //| main_clock: microcontroller.Pin = None,
47+ //| main_clock: Optional[ microcontroller.Pin] = None,
4848//| left_justified: bool = False
4949//| ) -> None:
5050//| """Create a I2SOut object associated with the given pins.
You can’t perform that action at this time.
0 commit comments