diff options
Diffstat (limited to 'docs/library/pyb.UART.rst')
-rw-r--r-- | docs/library/pyb.UART.rst | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/docs/library/pyb.UART.rst b/docs/library/pyb.UART.rst index b57a93873d..741c4e4912 100644 --- a/docs/library/pyb.UART.rst +++ b/docs/library/pyb.UART.rst @@ -82,10 +82,8 @@ Constructors .. class:: pyb.UART(bus, ...) Construct a UART object on the given bus. ``bus`` can be 0 or 1. - With no additional parameters, the UART object is created but not - initialised (it has the settings from the last initialisation of - the bus, if any). If extra arguments are given, the bus is initialised. - See ``init`` for parameters of initialisation. + If the bus is not given, the default one will be selected (0) or the selection + will be made based on the given pins. Methods ------- @@ -118,7 +116,7 @@ Methods .. only:: port_wipy - .. method:: uart.init(baudrate, bits=8, parity=None, stop=1, \*, pins=(TX, RX, RTS, CTS)) + .. method:: uart.init(baudrate=9600, bits=8, parity=None, stop=1, \*, pins=(TX, RX, RTS, CTS)) Initialise the UART bus with the given parameters: @@ -142,6 +140,11 @@ Methods Return ``True`` if any characters waiting, else ``False``. + .. method:: uart.writechar(char) + + Write a single character on the bus. ``char`` is an integer to write. + Return value: ``None``. + .. only:: port_wipy .. method:: uart.any() @@ -201,11 +204,6 @@ Methods Return value: number of bytes written. - .. method:: uart.writechar(char) - - Write a single character on the bus. ``char`` is an integer to write. - Return value: ``None``. - .. only:: port_wipy Write the buffer of bytes to the bus. |