# SPDX-License-Identifier: MIT
"""
-`displayio.epaperdisplay`
+`epaperdisplay`
================================================================================
-displayio for Blinka
+epaperdisplay for Blinka
**Software and Dependencies:**
import microcontroller
from digitalio import DigitalInOut
from circuitpython_typing import ReadableBuffer
-from ._displaycore import _DisplayCore
-from ._group import Group, circuitpython_splash
-from ._colorconverter import ColorConverter
-from ._displaybus import _DisplayBus
-from ._area import Area
-from ._constants import (
+from busdisplay._displaybus import _DisplayBus
+from displayio._displaycore import _DisplayCore
+from displayio._group import Group, circuitpython_splash
+from displayio._colorconverter import ColorConverter
+from displayio._area import Area
+from displayio._constants import (
CHIP_SELECT_TOGGLE_EVERY_BYTE,
CHIP_SELECT_UNTOUCHED,
DISPLAY_COMMAND,
address_little_endian: bool = False,
) -> None:
# pylint: disable=too-many-locals
- """Create a EPaperDisplay object on the given display bus (`displayio.FourWire` or
- `paralleldisplay.ParallelBus`).
+ """Create a EPaperDisplay object on the given display bus (`fourwire.FourWire` or
+ `paralleldisplaybus.ParallelBus`).
The ``start_sequence`` and ``stop_sequence`` are bitpacked to minimize the ram impact. Every
command begins with a command byte followed by a byte to determine the parameter count and
definition.
:param display_bus: The bus that the display is connected to
- :type _DisplayBus: displayio.FourWire or paralleldisplay.ParallelBus
+ :type _DisplayBus: fourwire.FourWire or paralleldisplaybus.ParallelBus
:param ~circuitpython_typing.ReadableBuffer start_sequence: Byte-packed command sequence.
:param ~circuitpython_typing.ReadableBuffer stop_sequence: Byte-packed command sequence.
:param int width: Width in pixels
self._refreshing = False
color_depth = 1
core_grayscale = True
+ # Disable while initializing
+ self._ticks_disabled = True
if advanced_color_epaper:
color_depth = 4
if highlight_color == 0x00 and write_color_ram_command != NO_COMMAND:
"""TODO: Clear"""
- self.show(circuitpython_splash)
+ self._set_root_group(circuitpython_splash)
def __new__(cls, *args, **kwargs):
- from . import ( # pylint: disable=import-outside-toplevel, cyclic-import
+ from displayio import ( # pylint: disable=import-outside-toplevel, cyclic-import
allocate_display,
)
allocate_display(display_instance)
return display_instance
- def show(self, group: Group) -> None:
- # pylint: disable=unnecessary-pass
- """
- .. note:: `show()` is deprecated and will be removed when CircuitPython 9.0.0
- is released. Use ``.root_group = group`` instead.
-
- Switches to displaying the given group of layers. When group is None, the default
- CircuitPython terminal will be shown (eventually).
- """
- if group is None:
- group = circuitpython_splash
- self._core.set_root_group(group)
+ @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:
ok = self._core.set_root_group(root_group)