aboutsummaryrefslogtreecommitdiff
path: root/cores
diff options
context:
space:
mode:
authorMartino Facchin <martino.facchin@si14.com>2015-06-01 14:06:32 +0000
committerMartino Facchin <martino.facchin@si14.com>2015-06-01 14:06:32 +0000
commit17b840d27f5fc1f0a62033b807ef8aff369fca54 (patch)
treea82217b8bb7933e0832867e02c621bf3e0468ed0 /cores
parent6c763b7df31fcae5e1b614a5c7f04c4046616401 (diff)
Add a Stream::find(char) method
Diffstat (limited to 'cores')
-rw-r--r--cores/arduino/Stream.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cores/arduino/Stream.h b/cores/arduino/Stream.h
index a810132..15f6761 100644
--- a/cores/arduino/Stream.h
+++ b/cores/arduino/Stream.h
@@ -64,6 +64,8 @@ class Stream : public Print
bool find(uint8_t *target, size_t length) { return find ((char *)target, length); }
// returns true if target string is found, false if timed out
+ bool find(char target) { return find (&target, 1); }
+
bool findUntil(char *target, char *terminator); // as find but search ends if the terminator string is found
bool findUntil(uint8_t *target, char *terminator) { return findUntil((char *)target, terminator); }