Skip to content
Merged
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
6 changes: 3 additions & 3 deletions adafruit_epd/ssd1681.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def power_up(self) -> None:
# driver output control
self.command(
_SSD1681_DRIVER_CONTROL,
bytearray([self._width - 1, (self._width - 1) >> 8, 0x00]),
bytearray([(self._width - 1) & 0xFF, (self._width - 1) >> 8, 0x00]),
)
# data entry mode
self.command(_SSD1681_DATA_MODE, bytearray([0x03]))
Expand All @@ -152,7 +152,7 @@ def power_up(self) -> None:
# Set ram Y start/end postion
self.command(
_SSD1681_SET_RAMYPOS,
bytearray([0, 0, self._height - 1, (self._height - 1) >> 8]),
bytearray([0, 0, (self._height - 1) & 0xFF, (self._height - 1) >> 8]),
)
# Set border waveform
self.command(_SSD1681_WRITE_BORDER, bytearray([0x05]))
Expand Down Expand Up @@ -190,4 +190,4 @@ def set_ram_address(self, x: int, y: int) -> None: # noqa: PLR6301, F841
# Set RAM X address counter
self.command(_SSD1681_SET_RAMXCOUNT, bytearray([x]))
# Set RAM Y address counter
self.command(_SSD1681_SET_RAMYCOUNT, bytearray([y, y >> 8]))
self.command(_SSD1681_SET_RAMYCOUNT, bytearray([y & 0xFF, y >> 8]))