]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - busdisplay/__init__.py
Update some doc links
[hackapet/Adafruit_Blinka_Displayio.git] / busdisplay / __init__.py
index 619b9fe2db717839479ccd40b711e4444eaf8dcc..8bd837dcdb6f9cc866f90eb1143b04b2714079be 100644 (file)
@@ -3,10 +3,10 @@
 # SPDX-License-Identifier: MIT
 
 """
 # SPDX-License-Identifier: MIT
 
 """
-`displayio.display`
+`busdisplay`
 ================================================================================
 
 ================================================================================
 
-displayio for Blinka
+busdisplay for Blinka
 
 **Software and Dependencies:**
 
 
 **Software and Dependencies:**
 
@@ -23,7 +23,6 @@ import digitalio
 import microcontroller
 from circuitpython_typing import WriteableBuffer, ReadableBuffer
 from displayio._displaycore import _DisplayCore
 import microcontroller
 from circuitpython_typing import WriteableBuffer, ReadableBuffer
 from displayio._displaycore import _DisplayCore
-from ._displaybus import _DisplayBus
 from displayio._colorconverter import ColorConverter
 from displayio._group import Group, circuitpython_splash
 from displayio._area import Area
 from displayio._colorconverter import ColorConverter
 from displayio._group import Group, circuitpython_splash
 from displayio._area import Area
@@ -37,6 +36,7 @@ from displayio._constants import (
     NO_COMMAND,
     DELAY,
 )
     NO_COMMAND,
     DELAY,
 )
+from ._displaybus import _DisplayBus
 
 __version__ = "0.0.0+auto.0"
 __repo__ = "https://github.com/adafruit/Adafruit_Blinka_displayio.git"
 
 __version__ = "0.0.0+auto.0"
 __repo__ = "https://github.com/adafruit/Adafruit_Blinka_displayio.git"
@@ -82,7 +82,7 @@ class BusDisplay:
         SH1107_addressing: bool = False,
     ):
         # pylint: disable=too-many-locals,invalid-name, too-many-branches
         SH1107_addressing: bool = False,
     ):
         # pylint: disable=too-many-locals,invalid-name, too-many-branches
-        """Create a Display object on the given display bus (`displayio.FourWire` or
+        """Create a Display object on the given display bus (`fourwire.FourWire` or
         `paralleldisplay.ParallelBus`).
 
         The ``init_sequence`` is bitpacked to minimize the ram impact. Every command begins
         `paralleldisplay.ParallelBus`).
 
         The ``init_sequence`` is bitpacked to minimize the ram impact. Every command begins
@@ -101,7 +101,7 @@ class BusDisplay:
                 b"\\x11\\x80\\x78"  # Exit Sleep then delay 0x78 (120ms)
                 b"\\x29\\x80\\x78"  # Display on then delay 0x78 (120ms)
             )
                 b"\\x11\\x80\\x78"  # Exit Sleep then delay 0x78 (120ms)
                 b"\\x29\\x80\\x78"  # Display on then delay 0x78 (120ms)
             )
-            display = displayio.Display(display_bus, init_sequence, width=320, height=240)
+            display = busdisplay.BusDisplay(display_bus, init_sequence, width=320, height=240)
 
         The first command is 0xE1 with 15 (0x0F) parameters following. The second and third
         are 0x11 and 0x29 respectively with delays (0x80) of 120ms (0x78) and no parameters.
 
         The first command is 0xE1 with 15 (0x0F) parameters following. The second and third
         are 0x11 and 0x29 respectively with delays (0x80) of 120ms (0x78) and no parameters.
@@ -225,7 +225,7 @@ class BusDisplay:
         self.auto_refresh = auto_refresh
 
     def __new__(cls, *args, **kwargs):
         self.auto_refresh = auto_refresh
 
     def __new__(cls, *args, **kwargs):
-        from ..displayio import (  # pylint: disable=import-outside-toplevel, cyclic-import
+        from displayio import (  # pylint: disable=import-outside-toplevel, cyclic-import
             allocate_display,
         )
 
             allocate_display,
         )
 
@@ -242,7 +242,8 @@ class BusDisplay:
             )
         self._core.send(DISPLAY_DATA, CHIP_SELECT_UNTOUCHED, pixels)
 
             )
         self._core.send(DISPLAY_DATA, CHIP_SELECT_UNTOUCHED, pixels)
 
-    def show(self, _group: Group) -> None: # pylint: disable=missing-function-docstring
+    @staticmethod
+    def show(_group: Group) -> None:  # pylint: disable=missing-function-docstring
         raise AttributeError(".show(x) removed. Use .root_group = x")
 
     def _set_root_group(self, root_group: Group) -> None:
         raise AttributeError(".show(x) removed. Use .root_group = x")
 
     def _set_root_group(self, root_group: Group) -> None: