diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2011-11-19 16:23:19 -0500 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2011-11-19 16:23:19 -0500 |
commit | b86a613d99961e9d35da685fefce39647bafa9de (patch) | |
tree | aa009ff8c4a51d8410bd507837b212965e0dfd98 /cores/arduino/Stream.h | |
parent | ee6ea5c26cfe7abe12dcf1dcbb3b49763d97cc31 (diff) |
readBytes() and readBytesUntil() handle zero bytes and return # of bytes read.
http://code.google.com/p/arduino/issues/detail?id=586
Diffstat (limited to 'cores/arduino/Stream.h')
-rw-r--r-- | cores/arduino/Stream.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cores/arduino/Stream.h b/cores/arduino/Stream.h index a3b25c5..13f11be 100644 --- a/cores/arduino/Stream.h +++ b/cores/arduino/Stream.h @@ -73,11 +73,11 @@ class Stream : public Print float parseFloat(); // float version of parseInt - int readBytes( char *buffer, size_t length); // read chars from stream into buffer + size_t readBytes( char *buffer, size_t length); // read chars from stream into buffer // terminates if length characters have been read or timeout (see setTimeout) // returns the number of characters placed in the buffer (0 means no valid data found) - int readBytesUntil( char terminator, char *buffer, size_t length); // as readBytes with terminator character + size_t readBytesUntil( char terminator, char *buffer, size_t length); // as readBytes with terminator character // terminates if length characters have been read, timeout, or if the terminator character detected // returns the number of characters placed in the buffer (0 means no valid data found) |