55
55
class SH1106 (displayio .Display ):
56
56
"""
57
57
SH1106 driver for use with DisplayIO
58
+
58
59
:param bus: The bus that the display is connected to.
59
60
:param int width: The width of the display. Maximum of 132
60
61
:param int height: The height of the display. Maximum of 64
@@ -71,7 +72,6 @@ def __init__(self, bus, **kwargs):
71
72
grayscale = True ,
72
73
pixels_in_byte_share_row = False , # in vertical (column) mode
73
74
data_as_commands = True , # every byte will have a command byte preceeding
74
- set_vertical_scroll = 0xD3 , # TBD -- not sure about this one!
75
75
brightness_command = 0x81 ,
76
76
single_byte_bounds = True ,
77
77
# for sh1107 use column and page addressing.
@@ -86,19 +86,21 @@ def __init__(self, bus, **kwargs):
86
86
def is_awake (self ):
87
87
"""
88
88
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.
90
91
"""
91
92
return self ._is_awake
92
93
93
94
def sleep (self ):
94
95
"""
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
+
97
98
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
102
104
"""
103
105
if self ._is_awake :
104
106
self .bus .send (int (0xAE ), "" ) # 0xAE = display off, sleep mode
0 commit comments