diff options
author | robert-hh <robert@hammelrath.com> | 2022-08-26 20:37:43 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-08-31 00:20:44 +1000 |
commit | b74eeee5e0e2a6c1437072c7343ccf9a5e7b5aad (patch) | |
tree | 7f0e86ad0b5f08e2d2e19db518816ed8496639d5 /docs/library/machine.UART.rst | |
parent | a39b88f0fbffe802dc8a80980e6fd675c9ef5a65 (diff) | |
download | micropython-b74eeee5e0e2a6c1437072c7343ccf9a5e7b5aad.tar.gz micropython-b74eeee5e0e2a6c1437072c7343ccf9a5e7b5aad.zip |
docs/library/machine.UART: Add docs for uart.flush() and uart.txdone().
Diffstat (limited to 'docs/library/machine.UART.rst')
-rw-r--r-- | docs/library/machine.UART.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/library/machine.UART.rst b/docs/library/machine.UART.rst index 1d54174c99..c3eca8f55a 100644 --- a/docs/library/machine.UART.rst +++ b/docs/library/machine.UART.rst @@ -177,6 +177,32 @@ Methods Availability: WiPy. +.. method:: UART.flush() + + Waits until all data has been sent. In case of a timeout, an exception is raised. The timeout + duration depends on the tx buffer size and the baud rate. Unless flow control is enabled, a timeout + should not occur. + + .. note:: + + For the rp2, esp8266 and nrf ports the call returns while the last byte is sent. + If required, a one character wait time has to be added in the calling script. + + Availability: rp2, esp32, esp8266, mimxrt, cc3200, stm32, nrf ports + +.. method:: UART.txdone() + + Tells whether all data has been sent or no data transfer is happening. In this case, + it returns ``True``. If a data transmission is ongoing it returns ``False``. + + .. note:: + + For the rp2, esp8266 and nrf ports the call may return ``True`` even if the last byte + of a transfer is still being sent. If required, a one character wait time has to be + added in the calling script. + + Availability: rp2, esp32, esp8266, mimxrt, cc3200, stm32, nrf ports + Constants --------- |