Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b2f20a6

Browse files
committed
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 6d2728c commit b2f20a6

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‎

Lines changed: 2 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /