microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
41 stars 22 forks source link

`spi.read(-1)` locks up MicroPython #208

Closed microbit-carlos closed 1 month ago

microbit-carlos commented 2 months ago

Without any devices connected to the SPI pins:

>>> spi.init()
>>> # This read() call never returns
>>> spi.read(-1)
dpgeorge commented 1 month ago

Fixed by ef2a57ea101647bb4b72c51aca2a0b4e6157c36d, negative values now raise a ValueError.