Skip to content

Commit 1a3577f

Browse files
authored
Merge pull request #25 from FoamyGuy/displayio_api_update
displayio API update
2 parents 0ebc3b1 + e745dc3 commit 1a3577f

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

adafruit_ssd1322.py

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

29-
import displayio
29+
import busdisplay
30+
31+
try:
32+
import typing
33+
34+
import fourwire
35+
except ImportError:
36+
pass
3037

3138
__version__ = "0.0.0+auto.0"
3239
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_SSD1322.git"
@@ -63,7 +70,7 @@
6370
)
6471

6572

66-
class SSD1322(displayio.Display):
73+
class SSD1322(busdisplay.BusDisplay):
6774
"""
6875
SSD1322 driver
6976
@@ -73,7 +80,7 @@ class SSD1322(displayio.Display):
7380
(0, 90, 180, 270)
7481
"""
7582

76-
def __init__(self, bus: displayio.FourWire, **kwargs) -> None:
83+
def __init__(self, bus: fourwire.FourWire, **kwargs) -> None:
7784
# Patch the init sequence for 32 pixel high displays.
7885
init_sequence = bytearray(_INIT_SEQUENCE)
7986
height = kwargs["height"]

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# Uncomment the below if you use native CircuitPython modules such as
2626
# digitalio, micropython and busio. List the modules you use. Without it, the
2727
# autodoc module docs will fail to generate with a warning.
28-
autodoc_mock_imports = ["displayio"]
28+
autodoc_mock_imports = ["busdisplay", "fourwire"]
2929

3030

3131
intersphinx_mapping = {

0 commit comments

Comments
 (0)