From 14282536efd16ef59b263df38666bc5ed1b384ac Mon Sep 17 00:00:00 2001 From: foamyguy Date: Wed, 21 May 2025 16:22:42 -0500 Subject: [PATCH 1/2] displayio API update --- adafruit_ssd1322.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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"] From e745dc37e841281a2d6cc08ec5b8ffc7c1e337eb Mon Sep 17 00:00:00 2001 From: foamyguy Date: Wed, 21 May 2025 16:30:31 -0500 Subject: [PATCH 2/2] fix docs build --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = {