Skip to content

Commit 08ac087

Browse files
authored
Merge pull request #23 from lesamouraipourpre/vertical-scroll
Remove usage of the set_vertical_scroll Display constructor parameter.
2 parents 4b32558 + 4c55765 commit 08ac087

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

adafruit_displayio_ssd1306.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,14 @@
5353

5454

5555
class SSD1306(displayio.Display):
56-
"""SSD1306 driver"""
56+
"""
57+
SSD1306 driver
58+
59+
:param int width: The width of the display
60+
:param int height: The height of the display
61+
:param int rotation: The rotation of the display in degrees. Default is 0. Must be one of
62+
(0, 90, 180, 270)
63+
"""
5764

5865
def __init__(self, bus, **kwargs):
5966
# Patch the init sequence for 32 pixel high displays.
@@ -74,7 +81,6 @@ def __init__(self, bus, **kwargs):
7481
set_column_command=0x21,
7582
set_row_command=0x22,
7683
data_as_commands=True,
77-
set_vertical_scroll=0xD3,
7884
brightness_command=0x81,
7985
single_byte_bounds=True,
8086
)
@@ -85,17 +91,18 @@ def is_awake(self):
8591
"""
8692
The power state of the display. (read-only)
8793
88-
True if the display is active, False if in sleep mode.
94+
`True` if the display is active, `False` if in sleep mode.
95+
96+
:type: bool
8997
"""
9098
return self._is_awake
9199

92100
def sleep(self):
93101
"""
94-
Put display into sleep mode
102+
Put display into sleep mode.
95103
96-
Display uses < 10uA in sleep mode
97-
Display remembers display data and operation mode active prior to sleeping
98-
MP can access (update) the built-in display RAM
104+
Display uses < 10uA in sleep mode. Display remembers display data and operation mode
105+
active prior to sleeping. MP can access (update) the built-in display RAM.
99106
"""
100107
if self._is_awake:
101108
self.bus.send(int(0xAE), "") # 0xAE = display off, sleep mode

0 commit comments

Comments
 (0)