Skip to content

Commit 245b948

Browse files
Chris--Asandeepmistry
authored andcommitted
Add Stream::find(char); to SAM core.
This is a feature added to the AVR core here: ed1b8eb It allows using the find method with a single char (#847).
1 parent 7857216 commit 245b948

File tree

1 file changed

+2
-0
lines changed
  • hardware/arduino/sam/cores/arduino

1 file changed

+2
-0
lines changed

hardware/arduino/sam/cores/arduino/Stream.h

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ class Stream : public Print
7373
bool find(uint8_t *target, size_t length) { return find ((char *)target, length); }
7474
// returns true if target string is found, false if timed out
7575

76+
bool find(char target) { return find (&target, 1); }
77+
7678
bool findUntil(char *target, char *terminator); // as find but search ends if the terminator string is found
7779
bool findUntil(uint8_t *target, char *terminator) { return findUntil((char *)target, terminator); }
7880

0 commit comments

Comments
 (0)