aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Stream.h
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2011-11-19 16:23:19 -0500
committerDavid A. Mellis <d.mellis@arduino.cc>2011-11-19 16:23:19 -0500
commitb86a613d99961e9d35da685fefce39647bafa9de (patch)
treeaa009ff8c4a51d8410bd507837b212965e0dfd98 /cores/arduino/Stream.h
parentee6ea5c26cfe7abe12dcf1dcbb3b49763d97cc31 (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.h4
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)