3333
3434**Hardware:**
3535
36- .. todo:: Add links to any specific hardware product page(s), or category page(s). Use unordered list & hyperlink rST
37- inline format: "* `Link Text <url>`_"
36+ * `Adafruit 1.54" Tri-Color Display Breakout <https://www.adafruit.com/product/3625>`_
37+ * `Adafruit 2.13" Tri-Color Display Breakout <https://www.adafruit.com/product/4086>`_
38+ * `Adafruit Flexible 2.9" Black and White <https://www.adafruit.com/product/4262>`_
39+ * `Adafruit Flexible 2.13" Black and White <https://www.adafruit.com/product/4243>`_
40+ * `Adafruit 2.13" Tri-Color FeatherWing <https://www.adafruit.com/product/4128>`_
3841
3942**Software and Dependencies:**
4043
6467 b"\x82 \x01 \x00 " # VCM DC and delay 50ms
6568 b"\x02 \x00 " # Power off
6669)
67-
6870# pylint: disable=too-few-public-methods
6971class IL0373 (displayio .EPaperDisplay ):
7072 """IL0373 driver"""
71- def __init__ (self , bus , ** kwargs ):
73+ def __init__ (self , bus , swap_rams = False , ** kwargs ):
7274 start_sequence = bytearray (_START_SEQUENCE )
7375
7476 width = kwargs ["width" ]
@@ -80,8 +82,21 @@ def __init__(self, bus, **kwargs):
8082 start_sequence [26 ] = width & 0xFF
8183 start_sequence [27 ] = (height >> 8 ) & 0xFF
8284 start_sequence [28 ] = height & 0xFF
85+ if swap_rams :
86+ color_bits_inverted = kwargs .get ("black_bits_inverted" , False )
87+ write_color_ram_command = 0x10
88+ black_bits_inverted = kwargs .get ("color_bits_inverted" , True )
89+ write_black_ram_command = 0x13
90+ else :
91+ write_black_ram_command = 0x10
92+ 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 )
8395 super ().__init__ (bus , start_sequence , _STOP_SEQUENCE , ** kwargs ,
8496 ram_width = 160 , ram_height = 296 ,
8597 busy_state = False ,
86- write_black_ram_command = 0x10 , write_color_ram_command = 0x13 ,
87- color_bits_inverted = True , refresh_display_command = 0x12 )
98+ write_black_ram_command = write_black_ram_command ,
99+ write_color_ram_command = write_color_ram_command ,
100+ black_bits_inverted = black_bits_inverted ,
101+ color_bits_inverted = color_bits_inverted ,
102+ refresh_display_command = 0x12 )
0 commit comments