import time
import struct
-import circuitpython_typing
+from circuitpython_typing import WriteableBuffer, ReadableBuffer
from paralleldisplay import ParallelBus
from ._fourwire import FourWire
from ._group import Group
if self.current_group is not None:
self.current_group._update_transform(self.transform)
- def show(self, root_group: Group) -> bool:
- # pylint: disable=protected-access
-
+ def set_root_group(self, root_group: Group) -> bool:
"""
Switches to displaying the given group of layers. When group is `None`, the
default CircuitPython terminal will be shown.
:param Optional[displayio.Group] root_group: The group to show.
"""
-
- """
- # TODO: Implement Supervisor
- if root_group is None:
- circuitpython_splash = _Supervisor().circuitpython_splash
- if not circuitpython_splash._in_group:
- root_group = circuitpython_splash
- elif self.current_group == circuitpython_splash:
- return True
- """
+ # pylint: disable=protected-access
if root_group == self.current_group:
return True
def fill_area(
self,
area: Area,
- mask: circuitpython_typing.WriteableBuffer,
- buffer: circuitpython_typing.WriteableBuffer,
+ mask: WriteableBuffer,
+ buffer: WriteableBuffer,
) -> bool:
"""Call the current group's fill area function"""
if self.current_group is not None:
if not overlaps:
return False
- # Expand the area if we have multiple pixels per byte and we need to byte align the bounds
+ # Expand the area if we have multiple pixels per byte and we need to byte
+ # align the bounds
if self.colorspace.depth < 8:
pixels_per_byte = (
8 // self.colorspace.depth * self.colorspace.bytes_per_cell
self,
data_type: int,
chip_select: int,
- data: circuitpython_typing.ReadableBuffer,
+ data: ReadableBuffer,
) -> None:
"""
Send the data to the current bus
"""
- print(data_type, chip_select, data)
self._send(data_type, chip_select, data)
def begin_transaction(self) -> None: