From 481d714bd56e0173668b249760e9cea8fce9b04f Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 11 Oct 2014 17:57:10 +0100 Subject: stmhal: Overhaul UART class to use read/write, and improve it. UART object now uses a stream-like interface: read, readall, readline, readinto, readchar, write, writechar. Timeouts are configured when the UART object is initialised, using timeout and timeout_char keyword args. The object includes optional read buffering, using interrupts. You can set the buffer size dynamically using read_buf_len keyword arg. A size of 0 disables buffering. --- tests/pyb/uart.py.exp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/pyb/uart.py.exp') diff --git a/tests/pyb/uart.py.exp b/tests/pyb/uart.py.exp index 58ded4d84..dd98e1796 100644 --- a/tests/pyb/uart.py.exp +++ b/tests/pyb/uart.py.exp @@ -1,2 +1,6 @@ -UART(1, baudrate=9600, bits=8, stop=1, parity=None) -UART(1, baudrate=1200, bits=8, stop=1, parity=None) +UART(1, baudrate=9600, bits=8, parity=None, stop=1, timeout=1000, timeout_char=0, read_buf_len=64) +UART(1, baudrate=1200, bits=8, parity=None, stop=1, timeout=1000, timeout_char=0, read_buf_len=64) +False +3 +4 +None -- cgit v1.2.3