diff options
author | mattb5906 <mattb5906@talktalk.net> | 2016-03-18 22:26:37 +0000 |
---|---|---|
committer | mattb5906 <mattb5906@talktalk.net> | 2016-03-18 22:26:37 +0000 |
commit | 5976bcabcbfa9b4001feb0c8fd8f1391275aab9f (patch) | |
tree | 67049e6f016c816eeba1e5451ecc0ab14b97fa95 /cores/arduino/Stream.h | |
parent | 48d574b9f060faf2fac7f8dd897b1ddd17dadebe (diff) |
Add getTimeout accessor method.
Diffstat (limited to 'cores/arduino/Stream.h')
-rw-r--r-- | cores/arduino/Stream.h | 3 |
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) |