Skip to content

Commit a741cb1

Browse files
committed
displayio api updates
1 parent 8a89036 commit a741cb1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

adafruit_ssd1608.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@
2525
2626
"""
2727

28-
import displayio
28+
import epaperdisplay
29+
30+
try:
31+
import typing
32+
33+
import fourwire
34+
except ImportError:
35+
pass
2936

3037
__version__ = "0.0.0+auto.0"
3138
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_SSD1608.git"
@@ -45,10 +52,10 @@
4552
_STOP_SEQUENCE = b"\x10\x01\x01" # Enter deep sleep
4653

4754

48-
class SSD1608(displayio.EPaperDisplay):
55+
class SSD1608(epaperdisplay.EPaperDisplay):
4956
"""SSD1608 driver"""
5057

51-
def __init__(self, bus: displayio.FourWire, **kwargs) -> None:
58+
def __init__(self, bus: fourwire.FourWire, **kwargs) -> None:
5259
start_sequence = bytearray(_START_SEQUENCE)
5360
width = kwargs["width"]
5461
start_sequence[4] = (width - 1) & 0xFF

0 commit comments

Comments
 (0)