Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 44 additions & 2 deletions adafruit_epd/il0373.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,8 @@ def power_up(self) -> None:
self.command(_IL0373_POWER_SETTING, bytearray([0x03, 0x00, 0x2B, 0x2B, 0x09]))
self.command(_IL0373_BOOSTER_SOFT_START, bytearray([0x17, 0x17, 0x17]))
self.command(_IL0373_POWER_ON)

self.busy_wait()
time.sleep(0.2)

self.command(_IL0373_PANEL_SETTING, bytearray([0xCF]))
self.command(_IL0373_CDI, bytearray([0x37]))
self.command(_IL0373_PLL, bytearray([0x29]))
Expand Down Expand Up @@ -159,3 +157,47 @@ def set_ram_address(self, x: int, y: int) -> None: # noqa: PLR6301, F841
"""Set the RAM address location, not used on this chipset but required by
the superclass"""
return # on this chip it does nothing


class Adafruit_IL0373_213_Flex_Mono(Adafruit_IL0373):
"""Driver for Adafruit 2.13" Flexible Monochrome 212x104"""

def __init__(
self,
width: int,
height: int,
spi: SPI,
*,
cs_pin: DigitalInOut,
dc_pin: DigitalInOut,
sramcs_pin: DigitalInOut,
rst_pin: DigitalInOut,
busy_pin: DigitalInOut,
) -> None:
super().__init__(
width,
height,
spi,
cs_pin=cs_pin,
dc_pin=dc_pin,
sramcs_pin=sramcs_pin,
rst_pin=rst_pin,
busy_pin=busy_pin,
)

self.set_black_buffer(1, True)
self.set_color_buffer(0, True)

def power_up(self) -> None:
"""Power up the display in preparation for writing RAM and updating"""
self.hardware_reset()
self.busy_wait()

self.command(_IL0373_BOOSTER_SOFT_START, bytearray([0x17, 0x17, 0x17]))
self.command(_IL0373_POWER_ON)

self.busy_wait()
time.sleep(0.2)

self.command(_IL0373_PANEL_SETTING, bytearray([0x1F, 0x0D]))
self.command(_IL0373_CDI, bytearray([0x97]))
3 changes: 2 additions & 1 deletion examples/epd_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from adafruit_epd.ek79686 import Adafruit_EK79686
from adafruit_epd.epd import Adafruit_EPD
from adafruit_epd.il0373 import Adafruit_IL0373
from adafruit_epd.il0373 import Adafruit_IL0373, Adafruit_IL0373_213_Flex_Mono
from adafruit_epd.il0398 import Adafruit_IL0398
from adafruit_epd.il91874 import Adafruit_IL91874
from adafruit_epd.jd79661 import Adafruit_JD79661
Expand Down Expand Up @@ -42,6 +42,7 @@
# display = Adafruit_UC8179(648, 480, # 5.83" mono 648x480 display
# display = Adafruit_UC8179(800, 480, # 7.5" mono 800x480 display
# display = Adafruit_IL0373(128, 296, # 2.9" Tri-color display IL0373
# display = Adafruit_IL0373_213_Flex_Mono(104, 212,# 2.13" mono flex display
# display = Adafruit_SSD1680(128, 296, # 2.9" Tri-color display SSD1680
# display = Adafruit_SSD1683(400, 300, # 4.2" 300x400 Tri-Color display
# display = Adafruit_IL0398(400, 300, # 4.2" Tri-color display
Expand Down