Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 31
31
https://github.com/adafruit/circuitpython/releases
32
32
33
33
"""
34
-
35
- import displayio
36
-
37
34
try :
38
35
from typing import Union
36
+ from busdisplay import BusDisplay
37
+ from fourwire import FourWire
38
+ from i2cdisplaybus import I2CDisplayBus
39
39
except ImportError :
40
- pass
40
+ from displayio import FourWire
41
+ from displayio import I2CDisplay as I2CDisplayBus
42
+ from displayio import Display as BusDisplay
41
43
42
44
__version__ = "0.0.0+auto.0"
43
45
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306.git"
60
62
)
61
63
62
64
63
- class SSD1306 (displayio . Display ):
65
+ class SSD1306 (BusDisplay ):
64
66
"""
65
67
SSD1306 driver
66
68
@@ -70,9 +72,7 @@ class SSD1306(displayio.Display):
70
72
(0, 90, 180, 270)
71
73
"""
72
74
73
- def __init__ (
74
- self , bus : Union [displayio .FourWire , displayio .I2CDisplay ], ** kwargs
75
- ) -> None :
75
+ def __init__ (self , bus : Union [FourWire , I2CDisplayBus ], ** kwargs ) -> None :
76
76
# Patch the init sequence for 32 pixel high displays.
77
77
init_sequence = bytearray (_INIT_SEQUENCE )
78
78
height = kwargs ["height" ]
0 commit comments