Closed dhalbert closed 1 week ago
See https://github.com/adafruit/circuitpython/issues/9586. As of https://github.com/adafruit/circuitpython/pull/9164, on Espressif, SPI.deinit() waits for the SPI lock to be unlocked before doing the deinit. This causes DotStar.deinit() to hang. The DotStar object has exclusive access to the SPI it creates and does not bother to lock and unlock it each time.
SPI.deinit()
DotStar.deinit()
DotStar
SPI
So just unlock the SPI lock before doing the deinit(). This may become unnecessary when https://github.com/adafruit/circuitpython/issues/9586 is addressed, but it's safer anyway.
deinit()
See https://github.com/adafruit/circuitpython/issues/9586. As of https://github.com/adafruit/circuitpython/pull/9164, on Espressif,
SPI.deinit()
waits for the SPI lock to be unlocked before doing the deinit. This causesDotStar.deinit()
to hang. TheDotStar
object has exclusive access to theSPI
it creates and does not bother to lock and unlock it each time.So just unlock the SPI lock before doing the
deinit()
. This may become unnecessary when https://github.com/adafruit/circuitpython/issues/9586 is addressed, but it's safer anyway.