Skip to content

Update readBytesUntil.adoc #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Language/Functions/Communication/Serial/readBytesUntil.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ title: Serial.readBytesUntil()

[float]
=== Description
Serial.readBytesUntil() reads characters from the serial buffer into an array. The function terminates if the terminator character is detected, the determined length has been read, or it times out (see link:../settimeout[Serial.setTimeout()]). The function returns the characters up to the last character before the supplied terminator. The terminator itself is not returned in the buffer.
Serial.readBytesUntil() reads characters from the serial buffer into an array. The function terminates (checks being done in this order) if the determined length has been read, if it times out (see link:../settimeout[Serial.setTimeout()]), or if the terminator character is detected (in which case the function returns the characters up to the last character before the supplied terminator). The terminator itself is not returned in the buffer.

`Serial.readBytesUntil()` returns the number of characters read into the buffer. A 0 means no valid data was found.
`Serial.readBytesUntil()` returns the number of characters read into the buffer. A 0 means that the `length` parameter \<= 0, a time out occurred before any other input, or a termination character was found before any other input.

`Serial.readBytesUntil()` inherits from the link:../../stream[Stream] utility class.
[%hardbreaks]
Expand Down Expand Up @@ -49,7 +49,7 @@ Data type: `size_t`.

[float]
=== Notes and Warnings
The terminator character is discarded from the serial buffer.
The terminator character is discarded from the serial buffer, unless the number of characters read and copied into the buffer equals `length`.
[%hardbreaks]

--
Expand Down