Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle displayio refactoring for CP9 #4

Merged
merged 2 commits into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions examples/wii_classic_displayio_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
import board
import terminalio
import displayio

# Support 8.x.x and 9.x.x. Can be simplified after 8.x.x is discontinued as a stable release.
try:
from fourwire import FourWire
except ImportError:
from displayio import FourWire

import simpleio
from adafruit_display_text import label
from adafruit_display_shapes.circle import Circle
Expand All @@ -16,9 +23,7 @@
tft_cs = board.A2
tft_dc = board.A1

display_bus = displayio.FourWire(
spi, command=tft_dc, chip_select=tft_cs, reset=board.A3
)
display_bus = FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=board.A3)
display = adafruit_ili9341.ILI9341(display_bus, width=320, height=240)

bg = displayio.OnDiskBitmap("/wii_classic.bmp")
Expand Down