diff options
Diffstat (limited to 'tests/pyb/uart.py')
-rw-r--r-- | tests/pyb/uart.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/pyb/uart.py b/tests/pyb/uart.py index dff5a5687..cb0be91c0 100644 --- a/tests/pyb/uart.py +++ b/tests/pyb/uart.py @@ -1,5 +1,13 @@ from pyb import UART +# test we can correctly create by id or name +for bus in (-1, 0, 1, 2, 3, 4, 5, 6, 7, "XA", "XB", "YA", "YB", "Z"): + try: + UART(bus, 9600) + print("UART", bus) + except ValueError: + print("ValueError", bus) + uart = UART(1) uart = UART(1, 9600) uart = UART(1, 9600, bits=8, parity=None, stop=1) |