summaryrefslogtreecommitdiff
path: root/docs/library/pyb.UART.rst
diff options
context:
space:
mode:
authorDaniel Campora <daniel@wipy.io>2015-09-11 14:57:48 +0200
committerDaniel Campora <daniel@wipy.io>2015-09-16 10:10:22 +0200
commitf38d16483a41313bedef683d331c8cb26af50f14 (patch)
tree82156d53a534b1f9085aef5101c98f5b9f5f0434 /docs/library/pyb.UART.rst
parente77abc261bf47343d14c4b5e26c80a0136b93e7c (diff)
docs: Update I2C and UART docs to match the new API.
Diffstat (limited to 'docs/library/pyb.UART.rst')
-rw-r--r--docs/library/pyb.UART.rst18
1 files changed, 8 insertions, 10 deletions
diff --git a/docs/library/pyb.UART.rst b/docs/library/pyb.UART.rst
index b57a93873..741c4e491 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.