@@ -117,10 +117,8 @@ def power_up(self) -> None:
117117 self .command (_IL0373_POWER_SETTING , bytearray ([0x03 , 0x00 , 0x2B , 0x2B , 0x09 ]))
118118 self .command (_IL0373_BOOSTER_SOFT_START , bytearray ([0x17 , 0x17 , 0x17 ]))
119119 self .command (_IL0373_POWER_ON )
120-
121120 self .busy_wait ()
122121 time .sleep (0.2 )
123-
124122 self .command (_IL0373_PANEL_SETTING , bytearray ([0xCF ]))
125123 self .command (_IL0373_CDI , bytearray ([0x37 ]))
126124 self .command (_IL0373_PLL , bytearray ([0x29 ]))
@@ -159,3 +157,47 @@ def set_ram_address(self, x: int, y: int) -> None: # noqa: PLR6301, F841
159157 """Set the RAM address location, not used on this chipset but required by
160158 the superclass"""
161159 return # on this chip it does nothing
160+
161+
162+ class Adafruit_IL0373_213_Flex_Mono (Adafruit_IL0373 ):
163+ """Driver for Adafruit 2.13" Flexible Monochrome 212x104"""
164+
165+ def __init__ (
166+ self ,
167+ width : int ,
168+ height : int ,
169+ spi : SPI ,
170+ * ,
171+ cs_pin : DigitalInOut ,
172+ dc_pin : DigitalInOut ,
173+ sramcs_pin : DigitalInOut ,
174+ rst_pin : DigitalInOut ,
175+ busy_pin : DigitalInOut ,
176+ ) -> None :
177+ super ().__init__ (
178+ width ,
179+ height ,
180+ spi ,
181+ cs_pin = cs_pin ,
182+ dc_pin = dc_pin ,
183+ sramcs_pin = sramcs_pin ,
184+ rst_pin = rst_pin ,
185+ busy_pin = busy_pin ,
186+ )
187+
188+ self .set_black_buffer (1 , True )
189+ self .set_color_buffer (0 , True )
190+
191+ def power_up (self ) -> None :
192+ """Power up the display in preparation for writing RAM and updating"""
193+ self .hardware_reset ()
194+ self .busy_wait ()
195+
196+ self .command (_IL0373_BOOSTER_SOFT_START , bytearray ([0x17 , 0x17 , 0x17 ]))
197+ self .command (_IL0373_POWER_ON )
198+
199+ self .busy_wait ()
200+ time .sleep (0.2 )
201+
202+ self .command (_IL0373_PANEL_SETTING , bytearray ([0x1F , 0x0D ]))
203+ self .command (_IL0373_CDI , bytearray ([0x97 ]))
0 commit comments