tests/ports/rp2: Add simple rp2-specific UART test.

To test construction of UART instances.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2024-08-09 11:25:01 +10:00
parent fda7ae83a8
commit 651b63cd79
2 changed files with 11 additions and 0 deletions

View File

@ -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)

View File

@ -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)