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:
parent
fda7ae83a8
commit
651b63cd79
10
tests/ports/rp2/rp2_uart.py
Normal file
10
tests/ports/rp2/rp2_uart.py
Normal 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)
|
||||
1
tests/ports/rp2/rp2_uart.py.exp
Normal file
1
tests/ports/rp2/rp2_uart.py.exp
Normal 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)
|
||||
Loading…
x
Reference in New Issue
Block a user