Skip to content

Commit 651b63c

Browse files
committed
tests/ports/rp2: Add simple rp2-specific UART test.
To test construction of UART instances. Signed-off-by: Damien George <[email protected]>
1 parent fda7ae8 commit 651b63c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/ports/rp2/rp2_uart.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Test construction of machine.UART objects.
2+
3+
import sys
4+
from machine import UART
5+
6+
print(UART(0, tx=0, rx=1))
7+
8+
if "RP2350" in sys.implementation._machine:
9+
# Test that UART can be constructed using other tx/rx pins.
10+
UART(0, tx=2, rx=3)

tests/ports/rp2/rp2_uart.py.exp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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)

0 commit comments

Comments
 (0)