Merge 6df68af240 into c707c98615
This commit is contained in:
commit
20598fd1ee
2 changed files with 19 additions and 4 deletions
|
|
@ -25,7 +25,13 @@ Implementation Notes
|
|||
|
||||
"""
|
||||
|
||||
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 epaperdisplay import EPaperDisplay
|
||||
from fourwire import FourWire
|
||||
except ImportError:
|
||||
from displayio import EPaperDisplay, FourWire
|
||||
|
||||
__version__ = "0.0.0+auto.0"
|
||||
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_IL91874.git"
|
||||
|
|
@ -67,10 +73,10 @@ _STOP_SEQUENCE = b"\x02\x01\x17" # Power off
|
|||
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
class IL91874(displayio.EPaperDisplay):
|
||||
class IL91874(EPaperDisplay):
|
||||
"""IL91874 display driver"""
|
||||
|
||||
def __init__(self, bus: displayio.FourWire, **kwargs) -> None:
|
||||
def __init__(self, bus: FourWire, **kwargs) -> None:
|
||||
start_sequence = bytearray(_START_SEQUENCE)
|
||||
|
||||
width = kwargs["width"]
|
||||
|
|
|
|||
|
|
@ -14,6 +14,15 @@
|
|||
import time
|
||||
import board
|
||||
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:
|
||||
# pylint: disable=ungrouped-imports
|
||||
from displayio import FourWire
|
||||
|
||||
import adafruit_il91874
|
||||
|
||||
# Used to ensure the display is free in CircuitPython
|
||||
|
|
@ -27,7 +36,7 @@ epd_reset = board.D5
|
|||
epd_busy = board.D6
|
||||
|
||||
# Create the displayio connection to the display pins
|
||||
display_bus = displayio.FourWire(
|
||||
display_bus = FourWire(
|
||||
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
|
||||
)
|
||||
time.sleep(1) # Wait a bit
|
||||
|
|
|
|||
Loading…
Reference in a new issue