Skip to content

Commit

Permalink
FourWire support for 8.x.x and 9.x.x
Browse files Browse the repository at this point in the history
  • Loading branch information
dhalbert committed Dec 18, 2023
1 parent 2c58bb2 commit 252332e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions examples/ssd1681_four_corners.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@
import board
import busio
import displayio
import fourwire
import terminalio
import adafruit_ssd1681

# 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


displayio.release_displays()

# This pinout works on a Feather RP2040 EPD and may need to be altered for other
Expand All @@ -28,7 +35,7 @@
epd_reset = board.EPD_RESET
epd_busy = board.EPD_BUSY

display_bus = fourwire.FourWire(
display_bus = FourWire(
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)
display = adafruit_ssd1681.SSD1681(
Expand Down

0 comments on commit 252332e

Please sign in to comment.