From b86a613d99961e9d35da685fefce39647bafa9de Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 19 Nov 2011 16:23:19 -0500 Subject: readBytes() and readBytesUntil() handle zero bytes and return # of bytes read. http://code.google.com/p/arduino/issues/detail?id=586 --- cores/arduino/Stream.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cores/arduino/Stream.h') 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) -- cgit v1.2.3-18-g5258