8000 Update reference.rst · arduino-collections/Arduino@3c76e76 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c76e76

Browse files
authored
Update reference.rst
Missing ), clarifications
1 parent 69549ad commit 3c76e76

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/reference.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,25 +156,25 @@ from the hardware FIFO (128 bytes for TX and RX), ``Serial`` has an
156156
add 8000 itional customizable 256-byte RX buffer. The size of this software buffer can
157157
be changed by the user. It is suggested to use a bigger size at higher receive speeds.
158158

159-
The ``::setRxBufferSize(size_t size`` method changes the RX buffer size as needed. This
159+
The ``::setRxBufferSize(size_t size)`` method changes the RX buffer size as needed. This
160160
should be called before ``::begin()``. The size argument should be at least large enough
161161
to hold all data received before reading.
162162

163-
For transmit-only operation, the buffer can be switched off by passing mode SERIAL_TX_ONLY
164-
to Serial.begin(). Other modes are SERIAL_RX_ONLY and SERIAL_FULL (the default).
163+
For transmit-only operation, the buffer can be switched off o save RAM by passing mode
164+
SERIAL_TX_ONLY to Serial.begin(). Other modes are SERIAL_RX_ONLY and SERIAL_FULL (the default).
165165

166-
Receive is interrupt-driven, but transmit polls and busy-waits. Both are
167-
blocking:
166+
Receive is interrupt-driven, but transmit polls and busy-waits. Blocking behavior is as follows:
168167
The ``::write()`` call does not block if the number of bytes fits in the current space available
169168
in the TX FIFO. The call blocks if the TX FIFO is full and waits until there is room before
170-
writing more bytes into it. In other words, when the call returns, all bytes have been written
171-
to the FIFO, but that doesn't mean that all bytes have been sent out through the serial line yet.
172-
The ``::read()`` call does not block if there are no bytes available for reading.
169+
writing more bytes into it, until all bytes are written. In other words, when the call returns,
170+
all bytes have been written to the TX FIFO, but that doesn't mean that all bytes have been sent
171+
out through the serial line yet.
172+
The ``::read()`` call doesn't block, not even if there are no bytes available for reading.
173173
The ``::readBytes()`` call blocks until the number of bytes read complies with the number of
174174
bytes required by the argument passed in.
175-
The ``::flush()`` call blocks waiting for the FIFO to be empty before returning. It is recommended
176-
to call this to make sure all bytes have been sent before doing configuration changes on the serial
177-
port (e.g. changing baudrate) or doing a board reset.
175+
The ``::flush()`` call blocks waiting for the TX FIFO to be empty before returning. It is
176+
recommended to call this to make sure all bytes have been sent before doing configuration changes
177+
on the serial port (e.g. changing baudrate) or doing a board reset.
178178

179179
``Serial`` uses UART0, which is mapped to pins GPIO1 (TX) and GPIO3
180180
(RX). Serial may be remapped to GPIO15 (TX) and GPIO13 (RX) by calling

0 commit comments

Comments
 (0)
0