33
33
34
34
class _SSD1306 :
35
35
"""Base class for SSD1306 display driver"""
36
+ #pylint: disable-msg=too-many-arguments
36
37
def __init__ (self , framebuffer , width , height , external_vcc , reset ):
37
38
self .framebuf = framebuffer
38
39
self .width = width
@@ -78,7 +79,7 @@ def init_display(self):
78
79
self .show ()
79
80
80
81
def poweroff (self ):
81
- """Turn the device Power off """
82
+ """Turn off the display (nothing visible) """
82
83
self .write_cmd (SET_DISP | 0x00 )
83
84
84
85
def contrast (self , contrast ):
@@ -87,7 +88,7 @@ def contrast(self, contrast):
87
88
self .write_cmd (contrast )
88
89
89
90
def invert (self , invert ):
90
- """Invert the pixels on the display"""
91
+ """Invert all pixels on the display"""
91
92
self .write_cmd (SET_NORM_INV | (invert & 1 ))
92
93
93
94
def write_framebuf (self ):
@@ -99,6 +100,7 @@ def write_cmd(self, cmd):
99
100
raise NotImplementedError
100
101
101
102
def poweron (self ):
103
+ "Reset device and turn on the display."
102
104
if self .reset_pin :
103
105
self .reset_pin .value = 1
104
106
time .sleep (0.001 )
@@ -125,7 +127,7 @@ def show(self):
125
127
self .write_framebuf ()
126
128
127
129
def fill (self , value ):
128
- """Fill the display on or off """
130
+ """Fill the display with all ones or zeros. """
129
131
self .framebuf .fill (value )
130
132
131
133
def pixel (self , xpos , ypos , value ):
0 commit comments