aboutsummaryrefslogtreecommitdiff
path: root/libraries/SoftwareSerial/SoftwareSerial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/SoftwareSerial/SoftwareSerial.cpp')
-rw-r--r--libraries/SoftwareSerial/SoftwareSerial.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/libraries/SoftwareSerial/SoftwareSerial.cpp b/libraries/SoftwareSerial/SoftwareSerial.cpp
index 8bf56e5..a429f7d 100644
--- a/libraries/SoftwareSerial/SoftwareSerial.cpp
+++ b/libraries/SoftwareSerial/SoftwareSerial.cpp
@@ -195,6 +195,17 @@ bool SoftwareSerial::listen()
return false;
}
+// Stop listening. Returns true if we were actually listening.
+bool SoftwareSerial::stopListening()
+{
+ if (active_object == this)
+ {
+ active_object = NULL;
+ return true;
+ }
+ return false;
+}
+
//
// The receive routine called by the interrupt handler
//