circuitpython/shared-bindings/rgbmatrix
Jeff Epler ed5c0bd465 rgbmatrix: Avoid leaving an incompletely configured display bus
I did not reproduce the exact problem reported; however, I reproduced
that a failure to construct an RGBMatrix object would leave CircuitPython
in an inconsistent state with a display bus registered but not working:

```py
>>> import rgbmatrix, board; rgbmatrix.RGBMatrix(width=64, bit_depth=1, rgb_pins=[], addr_pins=[], clock_pin=board.A0, latch_pin=board.A1, output_enable_pin=board.A2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: The length of rgb_pins must be 6, 12, 18, 24, or 30
>>> import rgbmatrix, board; rgbmatrix.RGBMatrix(width=64, bit_depth=1, rgb_pins=[], addr_pins=[], clock_pin=board.A0, latch_pin=board.A1, output_enable_pin=board.A2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: Too many display busses; forgot displayio.release_displays() ?
```

After the fix the second call also results in a ValueError, not a
RuntimeError, which is correct.

Closes #9674
2024-12-04 12:11:45 -06:00
..
__init__.c CircuitPython files: replace STATIC with static 2024-05-20 11:02:17 -04:00
RGBMatrix.c rgbmatrix: Avoid leaving an incompletely configured display bus 2024-12-04 12:11:45 -06:00
RGBMatrix.h update headers of most CircuitPython-only files 2024-05-17 14:56:28 -04:00