File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
hardware/arduino/avr/libraries/SoftwareSerial 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()
195195 return false ;
196196}
197197
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+
198209//
199210// The receive routine called by the interrupt handler
200211//
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ class SoftwareSerial : public Stream
8787 bool listen ();
8888 void end ();
8989 bool isListening () { return this == active_object; }
90+ bool stopListening ();
9091 bool overflow () { bool ret = _buffer_overflow; _buffer_overflow = false ; return ret; }
9192 int peek ();
9293
You can’t perform that action at this time.
0 commit comments