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

9.x compatibility #18

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
12 changes: 10 additions & 2 deletions adafruit_monsterm4sk.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
import digitalio
from adafruit_seesaw.seesaw import Seesaw
import displayio

# Compatibility with both CircuitPython 8.x.x and 9.x.x.
# Remove after 8.x.x is no longer a supported release.
try:
from fourwire import FourWire
except ImportError:
from displayio import FourWire

import touchio
from adafruit_st7789 import ST7789
import adafruit_lis3dh
Expand Down Expand Up @@ -109,7 +117,7 @@ def __init__(self, i2c: Optional[I2C] = None):
left_tft_cs = board.LEFT_TFT_CS
left_tft_dc = board.LEFT_TFT_DC

left_display_bus = displayio.FourWire(
left_display_bus = FourWire(
left_spi, command=left_tft_dc, chip_select=left_tft_cs # Reset on Seesaw
)

Expand All @@ -127,7 +135,7 @@ def __init__(self, i2c: Optional[I2C] = None):
right_tft_cs = board.RIGHT_TFT_CS
right_tft_dc = board.RIGHT_TFT_DC

right_display_bus = displayio.FourWire(
right_display_bus = FourWire(
right_spi,
command=right_tft_dc,
chip_select=right_tft_cs,
Expand Down
Loading