diff --git a/src/aiy/_drivers/_buzzer.py b/src/aiy/_buzzer.py similarity index 100% rename from src/aiy/_drivers/_buzzer.py rename to src/aiy/_buzzer.py diff --git a/src/aiy/_drivers/__init__.py b/src/aiy/_drivers/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/aiy/toneplayer.py b/src/aiy/toneplayer.py index 0a308bfa..33902caa 100644 --- a/src/aiy/toneplayer.py +++ b/src/aiy/toneplayer.py @@ -20,11 +20,10 @@ :any:`aiy.pins.BUZZER_GPIO_PIN`. """ - -import time import re +import time -from aiy._drivers._buzzer import PWMController +from ._buzzer import PWMController class Rest: diff --git a/src/aiy/trackplayer.py b/src/aiy/trackplayer.py index 7e67e02c..4e544407 100644 --- a/src/aiy/trackplayer.py +++ b/src/aiy/trackplayer.py @@ -25,8 +25,8 @@ import re import time -from aiy._drivers._buzzer import PWMController -from aiy.toneplayer import Note +from .toneplayer import Note +from ._buzzer import PWMController class Command: diff --git a/src/aiy/_drivers/_spicomm.py b/src/aiy/vision/_spicomm.py similarity index 100% rename from src/aiy/_drivers/_spicomm.py rename to src/aiy/vision/_spicomm.py diff --git a/src/aiy/_drivers/_transport.py b/src/aiy/vision/_transport.py similarity index 98% rename from src/aiy/_drivers/_transport.py rename to src/aiy/vision/_transport.py index c75b6937..8bd8763e 100644 --- a/src/aiy/_drivers/_transport.py +++ b/src/aiy/vision/_transport.py @@ -19,8 +19,7 @@ import socket import struct -from aiy._drivers import _spicomm - +from . import _spicomm class _SpiTransport: """Communicate with VisionBonnet over SPI bus.""" diff --git a/src/aiy/vision/inference.py b/src/aiy/vision/inference.py index fd4f7130..0123d600 100644 --- a/src/aiy/vision/inference.py +++ b/src/aiy/vision/inference.py @@ -28,8 +28,8 @@ import time from collections import namedtuple -import aiy.vision.proto.protocol_pb2 as pb2 -from aiy._drivers._transport import make_transport +from .proto import protocol_pb2 as pb2 +from ._transport import make_transport logger = logging.getLogger(__name__) diff --git a/src/tests/spicomm_test.py b/src/tests/spicomm_test.py index ca2a6d9b..d9b4e24f 100644 --- a/src/tests/spicomm_test.py +++ b/src/tests/spicomm_test.py @@ -5,13 +5,13 @@ import aiy.vision.proto.protocol_pb2 as pb2 -from aiy._drivers._spicomm import SPICOMM_DEV -from aiy._drivers._spicomm import SPICOMM_IOCTL_TRANSACT -from aiy._drivers._spicomm import SPICOMM_IOCTL_TRANSACT_MMAP +from aiy.vision._spicomm import SPICOMM_DEV +from aiy.vision._spicomm import SPICOMM_IOCTL_TRANSACT +from aiy.vision._spicomm import SPICOMM_IOCTL_TRANSACT_MMAP -from aiy._drivers._spicomm import AsyncSpicomm -from aiy._drivers._spicomm import SyncSpicomm -from aiy._drivers._spicomm import SyncSpicommMmap +from aiy.vision._spicomm import AsyncSpicomm +from aiy.vision._spicomm import SyncSpicomm +from aiy.vision._spicomm import SyncSpicommMmap @contextlib.contextmanager