From: James Carr Date: Thu, 22 Apr 2021 15:26:28 +0000 (+0100) Subject: Add toggle_every_byte parameter to send() X-Git-Tag: 0.6.0^2~2 X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/commitdiff_plain/a4a602ddde64c7556ae1664ef226d79644727e94 Add toggle_every_byte parameter to send() --- diff --git a/displayio/i2cdisplay.py b/displayio/i2cdisplay.py index a29422e..409e0a5 100644 --- a/displayio/i2cdisplay.py +++ b/displayio/i2cdisplay.py @@ -33,10 +33,6 @@ try: from typing import Optional except ImportError: pass -try: - from _typing import ReadableBuffer -except ImportError: - pass class I2CDisplay: @@ -93,12 +89,15 @@ class I2CDisplay: while not self._i2c.try_lock(): pass - def send(self, command: bool, data: ReadableBuffer) -> None: + def send(self, command: bool, data, *, toggle_every_byte=False) -> None: + # pylint: disable=unused-argument """ Sends the given command value followed by the full set of data. Display state, such as vertical scroll, set via ``send`` may or may not be reset once the code is done. """ + # NOTE: we have to have a toggle_every_byte parameter, which we ignore, + # because Display._write() sets it regardless of bus type. if command: n = len(data)