diff options
author | Damien George <damien.p.george@gmail.com> | 2016-11-14 23:31:40 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-11-14 23:31:40 +1100 |
commit | a392b3aa75c9309afedd7e9d9f6aeb739c9d9dab (patch) | |
tree | 2177b540b85baa26f5ed95668cac838fd13bd990 /docs/library/pyb.UART.rst | |
parent | aed3b5b7baa379b991be8d15f5a3e39ba90967a4 (diff) | |
download | micropython-a392b3aa75c9309afedd7e9d9f6aeb739c9d9dab.tar.gz micropython-a392b3aa75c9309afedd7e9d9f6aeb739c9d9dab.zip |
docs: Remove references to readall() and update stream read() docs.
Diffstat (limited to 'docs/library/pyb.UART.rst')
-rw-r--r-- | docs/library/pyb.UART.rst | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/docs/library/pyb.UART.rst b/docs/library/pyb.UART.rst index 4a692469f8..b6c0d1a20f 100644 --- a/docs/library/pyb.UART.rst +++ b/docs/library/pyb.UART.rst @@ -27,7 +27,7 @@ A UART object acts like a stream object and reading and writing is done using the standard stream methods:: uart.read(10) # read 10 characters, returns a bytes object - uart.readall() # read all available characters + uart.read() # read all available characters uart.readline() # read a line uart.readinto(buf) # read and store into the given buffer uart.write('abc') # write the 3 characters @@ -122,6 +122,9 @@ Methods If ``nbytes`` are available in the buffer, returns immediately, otherwise returns when sufficient characters arrive or the timeout elapses. + If ``nbytes`` is not given then the method reads as much data as possible. It + returns after the timeout has elapsed. + .. only:: port_pyboard *Note:* for 9 bit characters each character takes two bytes, ``nbytes`` must @@ -130,12 +133,6 @@ Methods Return value: a bytes object containing the bytes read in. Returns ``None`` on timeout. -.. method:: UART.readall() - - Read as much data as possible. Returns after the timeout has elapsed. - - Return value: a bytes object or ``None`` if timeout prevents any data being read. - .. method:: UART.readchar() Receive a single character on the bus. |