Skip to content

Commit fb78392

Browse files
authored
Merge pull request #19 from FoamyGuy/displayio_api_updates
displayio api updates
2 parents 8a89036 + aa4d3a0 commit fb78392

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-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

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
# SPDX-License-Identifier: Unlicense
44

55
Adafruit-Blinka
6+
Adafruit-Blinka-Displayio

0 commit comments

Comments
 (0)