File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,17 @@ bool SoftwareSerial::listen()
195
195
return false ;
196
196
}
197
197
198
+ // Stop listening. Returns true if we were actually listening.
199
+ bool SoftwareSerial::stopListening ()
200
+ {
201
+ if (active_object == this )
202
+ {
203
+ active_object = NULL ;
204
+ return true ;
205
+ }
206
+ return false ;
207
+ }
208
+
198
209
//
199
210
// The receive routine called by the interrupt handler
200
211
//
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ class SoftwareSerial : public Stream
87
87
bool listen ();
88
88
void end ();
89
89
bool isListening () { return this == active_object; }
90
+ bool stopListening ();
90
91
bool overflow () { bool ret = _buffer_overflow; _buffer_overflow = false ; return ret; }
91
92
int peek ();
92
93
You can’t perform that action at this time.
0 commit comments