diff options
| -rw-r--r-- | tests/ports/rp2/rp2_uart.py | 10 | ||||
| -rw-r--r-- | tests/ports/rp2/rp2_uart.py.exp | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/ports/rp2/rp2_uart.py b/tests/ports/rp2/rp2_uart.py new file mode 100644 index 000000000..da8859934 --- /dev/null +++ b/tests/ports/rp2/rp2_uart.py @@ -0,0 +1,10 @@ +# Test construction of machine.UART objects. + +import sys +from machine import UART + +print(UART(0, tx=0, rx=1)) + +if "RP2350" in sys.implementation._machine: + # Test that UART can be constructed using other tx/rx pins. + UART(0, tx=2, rx=3) diff --git a/tests/ports/rp2/rp2_uart.py.exp b/tests/ports/rp2/rp2_uart.py.exp new file mode 100644 index 000000000..72cd5fb00 --- /dev/null +++ b/tests/ports/rp2/rp2_uart.py.exp @@ -0,0 +1 @@ +UART(0, baudrate=115200, bits=8, parity=None, stop=1, tx=0, rx=1, txbuf=256, rxbuf=256, timeout=0, timeout_char=1, invert=None, irq=0) |
