X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/e9bd25cd220970d8b96eafcb0681a0f5385829cc..37fda9d4c4d48658a5f3133c7b0bbc88a9098c19:/src/busio.py diff --git a/src/busio.py b/src/busio.py index 61bebab..81b20c2 100755 --- a/src/busio.py +++ b/src/busio.py @@ -149,7 +149,10 @@ class UART(Lockable): timeout=1000, receiver_buffer_size=64, flow=None): - from machine import UART as _UART + if detector.board.any_embedded_linux: + raise RuntimeError('busio.UART not supported on this platform. Please use pyserial instead.') + else: + from machine import UART as _UART from microcontroller.pin import uartPorts self.baudrate = baudrate