Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
cf6daa09
Commit
cf6daa09
authored
Oct 24, 2015
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
docs: Explicitly specify behavior of UART stream protocol methods on timeout.
parent
4a9c60cd
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/library/machine.UART.rst
+6
-5
6 additions, 5 deletions
docs/library/machine.UART.rst
docs/library/pyb.UART.rst
+6
-5
6 additions, 5 deletions
docs/library/pyb.UART.rst
with
12 additions
and
10 deletions
docs/library/machine.UART.rst
+
6
−
5
View file @
cf6daa09
...
...
@@ -98,33 +98,34 @@ Methods
Read characters. If ``nbytes`` is specified then read at most that many bytes.
Return value: a bytes object containing the bytes read in. Returns ``
b''
``
Return value: a bytes object containing the bytes read in. Returns ``
None
``
on timeout.
.. method:: uart.readall()
Read as much data as possible.
Return value: a bytes object.
Return value: a bytes object
or ``None`` on timeout
.
.. method:: uart.readinto(buf[, nbytes])
Read bytes into the ``buf``. If ``nbytes`` is specified then read at most
that many bytes. Otherwise, read at most ``len(buf)`` bytes.
Return value: number of bytes read and stored into ``buf``.
Return value: number of bytes read and stored into ``buf`` or ``None`` on
timeout.
.. method:: uart.readline()
Read a line, ending in a newline character.
Return value: the line read.
Return value: the line read
or ``None`` on timeout
.
.. method:: uart.write(buf)
Write the buffer of bytes to the bus.
Return value: number of bytes written.
Return value: number of bytes written
or ``None`` on timeout
.
.. method:: uart.sendbreak()
...
...
This diff is collapsed.
Click to expand it.
docs/library/pyb.UART.rst
+
6
−
5
View file @
cf6daa09
...
...
@@ -119,14 +119,14 @@ Methods
*Note:* for 9 bit characters each character takes two bytes, ``nbytes`` must
be even, and the number of characters is ``nbytes/2``.
Return value: a bytes object containing the bytes read in. Returns ``
b''
``
Return value: a bytes object containing the bytes read in. Returns ``
None
``
on timeout.
.. method:: uart.readall()
Read as much data as possible.
Return value: a bytes object.
Return value: a bytes object
or ``None`` on timeout
.
.. method:: uart.readchar()
...
...
@@ -139,13 +139,14 @@ Methods
Read bytes into the ``buf``. If ``nbytes`` is specified then read at most
that many bytes. Otherwise, read at most ``len(buf)`` bytes.
Return value: number of bytes read and stored into ``buf``.
Return value: number of bytes read and stored into ``buf`` or ``None`` on
timeout.
.. method:: uart.readline()
Read a line, ending in a newline character.
Return value: the line read.
Return value: the line read
or ``None`` on timeout
.
.. method:: uart.write(buf)
...
...
@@ -156,7 +157,7 @@ Methods
bytes are used for each character (little endian), and ``buf`` must contain
an even number of bytes.
Return value: number of bytes written.
Return value: number of bytes written
or ``None`` on timeout
.
.. method:: uart.sendbreak()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment