Skip to content

Commit ce1bb70

Browse files
authored
Merge pull request #17 from FoamyGuy/displayio_api_updates
displayio API updates
2 parents b8dd563 + 182c913 commit ce1bb70

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

adafruit_simple_text_display.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
try:
2727
from typing import Optional, Tuple
2828

29+
import busdisplay
2930
from fontio import FontProtocol
3031
except ImportError:
3132
pass
@@ -72,7 +73,7 @@ def __init__(
7273
text_scale: int = 1,
7374
font: Optional[FontProtocol] = None,
7475
colors: Optional[Tuple[Tuple[int, int, int], ...]] = None,
75-
display: Optional[displayio.Display] = None,
76+
display: Optional[busdisplay.BusDisplay] = None,
7677
) -> None:
7778
"""Display lines of text on a display using displayio. Lines of text are created in order as
7879
shown in the example below. If you skip a number, the line will be shown blank on the
@@ -107,9 +108,9 @@ def __init__(
107108
library. For example, if you import the library as
108109
``from adafruit_simple_text_display import SimpleTextDisplay``, you can indicate the
109110
colors as follows: ``colors=(SimpleTextDisplay.WHITE, SimpleTextDisplay.RED)``.
110-
:param ~displayio.Display|None display: The display object. Defaults to assuming a built-in
111-
display. To use with an external display, instantiate the display object and provide it
112-
here. Defaults to ``board.DISPLAY``.
111+
:param ~busdisplay.BusDisplay|None display: The display object. Defaults to assuming
112+
a built-in display. To use with an external display, instantiate the display
113+
object and provide it here. Defaults to ``board.DISPLAY``.
113114
114115
This example displays two lines with temperature data in C and F on the display.
115116
Remember to call `show()` after the list to update the display.

0 commit comments

Comments
 (0)