]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - paralleldisplay.py
Bug fixes for SSD1306
[hackapet/Adafruit_Blinka_Displayio.git] / paralleldisplay.py
index f2aae8ddb29b00191f839e1a140e55ff135d4750..8cfa87eaa9e01e7ffad68a90655e0a2f94c1a717 100644 (file)
@@ -17,10 +17,11 @@ paralleldisplay for Blinka
 
 """
 
 
 """
 
-import _typing
+from typing import Optional
 import microcontroller
 import microcontroller
+from circuitpython_typing import ReadableBuffer
 
 
-__version__ = "0.0.0-auto.0"
+__version__ = "0.0.0+auto.0"
 __repo__ = "https://github.com/adafruit/Adafruit_Blinka_displayio.git"
 
 
 __repo__ = "https://github.com/adafruit/Adafruit_Blinka_displayio.git"
 
 
@@ -37,8 +38,8 @@ class ParallelBus:
         command: microcontroller.Pin,
         chip_select: microcontroller.Pin,
         write: microcontroller.Pin,
         command: microcontroller.Pin,
         chip_select: microcontroller.Pin,
         write: microcontroller.Pin,
-        read: microcontroller.Pin,
-        reset: microcontroller.Pin,
+        read: Optional[microcontroller.Pin],
+        reset: Optional[microcontroller.Pin] = None,
         frequency: int = 30000000,
     ):
         # pylint: disable=unnecessary-pass
         frequency: int = 30000000,
     ):
         # pylint: disable=unnecessary-pass
@@ -61,9 +62,24 @@ class ParallelBus:
         """
         raise NotImplementedError("ParallelBus reset has not been implemented yet")
 
         """
         raise NotImplementedError("ParallelBus reset has not been implemented yet")
 
-    def send(self, command: int, data: _typing.ReadableBuffer) -> None:
+    def send(self, command: int, data: ReadableBuffer) -> None:
         """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.
         """
         raise NotImplementedError("ParallelBus send has not been implemented yet")
         """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.
         """
         raise NotImplementedError("ParallelBus send has not been implemented yet")
+
+    def _send(
+        self,
+        _data_type: int,
+        _chip_select: int,
+        _data: ReadableBuffer,
+    ) -> None:
+        pass
+
+    def _begin_transaction(self) -> bool:
+        # pylint: disable=no-self-use
+        return True
+
+    def _end_transaction(self) -> None:
+        pass