8000 docs/library/machine.UART: Add docs for uart.flush() and uart.txdone(). · lowfatcode/micropython@b74eeee · GitHub
[go: up one dir, main page]

Skip to content

Commit b74eeee

Browse files
robert-hhdpgeorge
authored andcommitted
docs/library/machine.UART: Add docs for uart.flush() and uart.txdone().
1 parent a39b88f commit b74eeee

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/library/machine.UART.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,32 @@ Methods
177177

178178
Availability: WiPy.
179179

180+
.. method:: UART.flush()
181+
182+
Waits until all data has been sent. In case of a timeout, an exception is raised. The timeout
183+
duration depends on the tx buffer size and the baud rate. Unless flow control is enabled, a timeout
184+
should not occur.
185+
186+
.. note::
187+
188+
For the rp2, esp8266 and nrf ports the call returns while the last byte is sent.
189+
If required, a one character wait time has to be added in the calling script.
190+
191+
Availability: rp2, esp32, esp8266, mimxrt, cc3200, stm32, nrf ports
192+
193+
.. method:: UART.txdone()
194+
195+
Tells whether all data has been sent or no data transfer is happening. In this case,
196+
it returns ``True``. If a data transmission is ongoing it returns ``False``.
197+
198+
.. note::
199+
200+
For the rp2, esp8266 and nrf ports the call may return ``True`` even if the last byte
201+
of a transfer is still being sent. If required, a one character wait time has to be
202+
added in the calling script.
203+
204+
Availability: rp2, esp32, esp8266, mimxrt, cc3200, stm32, nrf ports
205+
180206
Constants
181207
---------
182208

0 commit comments

Comments
 (0)
0