Skip to content

Commit 0a35b55

Browse files
committed
Add getTimeout accessor method to Stream
Port of arduino/Arduino#4718 to SAMD core.
1 parent 40e5a4f commit 0a35b55

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SAMD CORE
99
* Fixed writing LOW to a digital input pin blocking subsequent digitalRead attempts
1010
* Fixed digitalWrite() unnecessarily activating the pull-up resistor
1111
* Wire: Slave writes now use TX buffer
12+
* Added getTimeout() method to Stream.
1213

1314
SAMD CORE 1.6.6 2016.05.19
1415

cores/arduino/Stream.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class Stream : public Print
6666
// parsing methods
6767

6868
void setTimeout(unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second
69-
69+
unsigned long getTimeout(void) { return _timeout; }
70+
7071
bool find(char *target); // reads data from the stream until the target string is found
7172
bool find(uint8_t *target) { return find ((char *)target); }
7273
// returns true if target string is found, false if timed out (see setTimeout)

0 commit comments

Comments
 (0)