From 5976bcabcbfa9b4001feb0c8fd8f1391275aab9f Mon Sep 17 00:00:00 2001 From: mattb5906 Date: Fri, 18 Mar 2016 22:26:37 +0000 Subject: Add getTimeout accessor method. --- cores/arduino/Stream.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cores/arduino/Stream.h') diff --git a/cores/arduino/Stream.h b/cores/arduino/Stream.h index db71bb6..e4fd433 100644 --- a/cores/arduino/Stream.h +++ b/cores/arduino/Stream.h @@ -66,7 +66,8 @@ class Stream : public Print // parsing methods void setTimeout(unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second - + unsigned long getTimeout(void) { return _timeout; } + bool find(char *target); // reads data from the stream until the target string is found bool find(uint8_t *target) { return find ((char *)target); } // returns true if target string is found, false if timed out (see setTimeout) -- cgit v1.2.3-18-g5258