Skip to content

Commit 105ae0c

Browse files
authored
Merge pull request #5 from lesamouraipourpre/vertical-scroll
Remove usage of the set_vertical_scroll Display constructor parameter.
2 parents 24db6cc + 0a061d2 commit 105ae0c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

adafruit_displayio_sh1106.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
class SH1106(displayio.Display):
5656
"""
5757
SH1106 driver for use with DisplayIO
58+
5859
:param bus: The bus that the display is connected to.
5960
:param int width: The width of the display. Maximum of 132
6061
:param int height: The height of the display. Maximum of 64
@@ -71,7 +72,6 @@ def __init__(self, bus, **kwargs):
7172
grayscale=True,
7273
pixels_in_byte_share_row=False, # in vertical (column) mode
7374
data_as_commands=True, # every byte will have a command byte preceeding
74-
set_vertical_scroll=0xD3, # TBD -- not sure about this one!
7575
brightness_command=0x81,
7676
single_byte_bounds=True,
7777
# for sh1107 use column and page addressing.
@@ -86,19 +86,21 @@ def __init__(self, bus, **kwargs):
8686
def is_awake(self):
8787
"""
8888
The power state of the display. (read-only)
89-
True if the display is active, False if in sleep mode.
89+
90+
`True` if the display is active, `False` if in sleep mode.
9091
"""
9192
return self._is_awake
9293

9394
def sleep(self):
9495
"""
95-
Put display into sleep mode
96-
The display uses < 5uA in sleep mode
96+
Put display into sleep mode. The display uses < 5uA in sleep mode.
97+
9798
Sleep mode does the following:
98-
1) Stops the oscillator and DC-DC circuits
99-
2) Stops the OLED drive
100-
3) Remembers display data and operation mode active prior to sleeping
101-
4) The MP can access (update) the built-in display RAM
99+
100+
1) Stops the oscillator and DC-DC circuits
101+
2) Stops the OLED drive
102+
3) Remembers display data and operation mode active prior to sleeping
103+
4) The MP can access (update) the built-in display RAM
102104
"""
103105
if self._is_awake:
104106
self.bus.send(int(0xAE), "") # 0xAE = display off, sleep mode

0 commit comments

Comments
 (0)