We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 244dc80 + a2d29c5 commit a674b8cCopy full SHA for a674b8c
ports/atmel-samd/common-hal/busio/SPI.c
@@ -194,14 +194,14 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) {
194
}
195
allow_reset_sercom(self->spi_desc.dev.prvt);
196
197
- // Mark as deinit early in case we are used in an interrupt.
198
- common_hal_busio_spi_mark_deinit(self);
199
-
200
spi_m_sync_disable(&self->spi_desc);
201
spi_m_sync_deinit(&self->spi_desc);
202
reset_pin_number(self->clock_pin);
203
reset_pin_number(self->MOSI_pin);
204
reset_pin_number(self->MISO_pin);
+
+ // This smashes self->clock_pin, so don't do it before resetting the pin above.
+ common_hal_busio_spi_mark_deinit(self);
205
206
207
bool common_hal_busio_spi_configure(busio_spi_obj_t *self,
0 commit comments