We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aca898e commit 436d97bCopy full SHA for 436d97b
docs/library/machine.UART.rst
@@ -65,8 +65,16 @@ Methods
65
66
.. method:: UART.any()
67
68
- Return true value if there're characters available for reading. On some
69
- boards, the number of available characters is returned.
+ Returns an integer counting the number of characters that can be read without
+ blocking. It will return 0 if there are no characters available and a positive
70
+ number if there are characters. The method may return 1 even if there is more
71
+ than one character available for reading.
72
+
73
+ For more sophisticated querying of available characters use select.poll::
74
75
+ poll = select.poll()
76
+ poll.register(uart, select.POLLIN)
77
+ poll.poll(timeout)
78
79
.. method:: UART.read([nbytes])
80
0 commit comments