69
69
)
70
70
# pylint: disable=too-few-public-methods
71
71
class IL0373 (displayio .EPaperDisplay ):
72
- """IL0373 driver"""
72
+ r"""IL0373 driver
73
+
74
+ :param bus: The data bus the display is on
75
+ :param bool swap_rams: Color and black rams/commands are swapped
76
+ :param \**kwargs:
77
+ See below
78
+
79
+ :Keyword Arguments:
80
+ * *width* (``int``) --
81
+ Display width
82
+ * *height* (``int``) --
83
+ Display height
84
+ * *rotation* (``int``) --
85
+ Display rotation
86
+ * *color_bits_inverted* (``bool``) --
87
+ Invert color bit values
88
+ * *black_bits_inverted* (``bool``) --
89
+ Invert black bit values
90
+ """
73
91
def __init__ (self , bus , swap_rams = False , ** kwargs ):
74
92
start_sequence = bytearray (_START_SEQUENCE )
75
93
@@ -83,15 +101,15 @@ def __init__(self, bus, swap_rams=False, **kwargs):
83
101
start_sequence [27 ] = (height >> 8 ) & 0xFF
84
102
start_sequence [28 ] = height & 0xFF
85
103
if swap_rams :
86
- color_bits_inverted = kwargs .get ( "black_bits_inverted " , False )
104
+ color_bits_inverted = kwargs .pop ( "color_bits_inverted " , False )
87
105
write_color_ram_command = 0x10
88
- black_bits_inverted = kwargs .get ( "color_bits_inverted " , True )
106
+ black_bits_inverted = kwargs .pop ( "black_bits_inverted " , True )
89
107
write_black_ram_command = 0x13
90
108
else :
91
109
write_black_ram_command = 0x10
92
110
write_color_ram_command = 0x13
93
- color_bits_inverted = kwargs .get ("color_bits_inverted" , True )
94
- black_bits_inverted = kwargs .get ("black_bits_inverted" , False )
111
+ color_bits_inverted = kwargs .pop ("color_bits_inverted" , True )
112
+ black_bits_inverted = kwargs .pop ("black_bits_inverted" , False )
95
113
super ().__init__ (bus , start_sequence , _STOP_SEQUENCE , ** kwargs ,
96
114
ram_width = 160 , ram_height = 296 ,
97
115
busy_state = False ,
0 commit comments