diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/pyb/uart.py | 7 | ||||
| -rw-r--r-- | tests/pyb/uart.py.exp | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/tests/pyb/uart.py b/tests/pyb/uart.py index cb0be91c0..838dd9cfc 100644 --- a/tests/pyb/uart.py +++ b/tests/pyb/uart.py @@ -23,3 +23,10 @@ print(uart.writechar(1)) # make sure this method exists uart.sendbreak() + +# non-blocking mode +uart = UART(1, 9600, timeout=0) +print(uart.write(b'1')) +print(uart.write(b'abcd')) +print(uart.writechar(1)) +print(uart.read(100)) diff --git a/tests/pyb/uart.py.exp b/tests/pyb/uart.py.exp index ea300c90c..4be50d328 100644 --- a/tests/pyb/uart.py.exp +++ b/tests/pyb/uart.py.exp @@ -12,9 +12,13 @@ UART XB UART YA UART YB ValueError Z -UART(1, baudrate=9600, bits=8, parity=None, stop=1, timeout=1000, timeout_char=0, read_buf_len=64) -UART(1, baudrate=2400, bits=8, parity=None, stop=1, timeout=1000, timeout_char=0, read_buf_len=64) +UART(1, baudrate=9600, bits=8, parity=None, stop=1, timeout=1000, timeout_char=2, read_buf_len=64) +UART(1, baudrate=2400, bits=8, parity=None, stop=1, timeout=1000, timeout_char=6, read_buf_len=64) 0 3 4 None +1 +4 +None +None |
