diff --git a/adafruit_ssd1322.py b/adafruit_ssd1322.py index 7c5bb5f..28b7cb6 100644 --- a/adafruit_ssd1322.py +++ b/adafruit_ssd1322.py @@ -26,7 +26,14 @@ """ -import displayio +import busdisplay + +try: + import typing + + import fourwire +except ImportError: + pass __version__ = "0.0.0+auto.0" __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_SSD1322.git" @@ -63,7 +70,7 @@ ) -class SSD1322(displayio.Display): +class SSD1322(busdisplay.BusDisplay): """ SSD1322 driver @@ -73,7 +80,7 @@ class SSD1322(displayio.Display): (0, 90, 180, 270) """ - def __init__(self, bus: displayio.FourWire, **kwargs) -> None: + def __init__(self, bus: fourwire.FourWire, **kwargs) -> None: # Patch the init sequence for 32 pixel high displays. init_sequence = bytearray(_INIT_SEQUENCE) height = kwargs["height"] diff --git a/docs/conf.py b/docs/conf.py index 0bd27f5..990ac45 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,7 +25,7 @@ # Uncomment the below if you use native CircuitPython modules such as # digitalio, micropython and busio. List the modules you use. Without it, the # autodoc module docs will fail to generate with a warning. -autodoc_mock_imports = ["displayio"] +autodoc_mock_imports = ["busdisplay", "fourwire"] intersphinx_mapping = {