Skip to content

Commit 94007e2

Browse files
committed
Add Stream::find(char) to SAM core (now equal to AVR core).
1 parent 9f6c6ae commit 94007e2

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
@@ -70,6 +70,8 @@ class Stream : public Print
7070
bool find(uint8_t *target, size_t length) { return find ((char *)target, length); }
7171
// returns true if target string is found, false if timed out
7272

73+
bool find(char target) { return find (&target, 1); }
74+
7375
bool findUntil(char *target, char *terminator); // as find but search ends if the terminator string is found
7476
bool findUntil(uint8_t *target, char *terminator) { return findUntil((char *)target, terminator); }
7577

0 commit comments

Comments
 (0)