Skip to content

Commit c3280d6

Browse files
committed
"displayio.release_displays()" was *after* spi initialization, leading to failures on device restart. Now Corrected.
1 parent 1b29123 commit c3280d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@ Usage Example
3838
import displayio
3939
from adafruit_st7789 import ST7789
4040
41-
spi = board.SPI()
41+
displayio.release_displays()
42+
4243
while not spi.try_lock():
4344
pass
45+
spi = board.SPI()
4446
spi.configure(baudrate=24000000) # Configure SPI for 24MHz
4547
spi.unlock()
4648
tft_cs = board.D5
4749
tft_dc = board.D6
4850
49-
displayio.release_displays()
5051
display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=board.D9)
5152
5253
display = ST7789(display_bus, width=240, height=240, rowstart=80)

0 commit comments

Comments
 (0)