X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/blobdiff_plain/07b3c4b67d4530d1b04e725899dcdf077d462d6e..b6c1453b93053cbf2fb6aae6f09fdb8f9b9e4345:/displayio/_displaycore.py diff --git a/displayio/_displaycore.py b/displayio/_displaycore.py index 96c47a8..76a5d18 100644 --- a/displayio/_displaycore.py +++ b/displayio/_displaycore.py @@ -101,6 +101,7 @@ class _DisplayCore: if bus: if isinstance(bus, (FourWire, I2CDisplay, ParallelBus)): self._bus_reset = bus.reset + self._bus_free = bus._free self._begin_transaction = bus._begin_transaction self._send = bus._send self._end_transaction = bus._end_transaction @@ -376,12 +377,14 @@ class _DisplayCore: """ Send the data to the current bus """ - print(len(data)) - if isinstance(data, memoryview): - data = data.tobytes() - print(data) self._send(data_type, chip_select, data) + def bus_free(self) -> bool: + """ + Check if the bus is free + """ + return self._bus_free() + def begin_transaction(self) -> bool: """ Begin Bus Transaction