aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Stream.h
diff options
context:
space:
mode:
authorSandeep Mistry <s.mistry@arduino.cc>2016-07-18 14:18:59 -0400
committerSandeep Mistry <s.mistry@arduino.cc>2016-07-18 14:18:59 -0400
commit0fd650271c16364339227b49def1014ea7415b27 (patch)
treee663589d6069230dba3ed2638c2581d1d90e6ac4 /cores/arduino/Stream.h
parent8ae5b5f43be7a7627ef6565ac8a92fc0b1f2b196 (diff)
parent5976bcabcbfa9b4001feb0c8fd8f1391275aab9f (diff)
Merge pull request #4718 from mattb5906/new-feature/stream-timeout-get-4680
Add getTimeout accessor method.
Diffstat (limited to 'cores/arduino/Stream.h')
-rw-r--r--cores/arduino/Stream.h3
1 files changed, 2 insertions, 1 deletions
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)