5353
5454
5555class 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