From 97fb130175f777a0d3e051f2bdd74c5e0795e470 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Thu, 5 Mar 2015 11:59:32 +0100 Subject: SoftwareSerial: match bool API with HardwareSerial --- libraries/SoftwareSerial/SoftwareSerial.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libraries/SoftwareSerial') diff --git a/libraries/SoftwareSerial/SoftwareSerial.h b/libraries/SoftwareSerial/SoftwareSerial.h index e28da98..274f3df 100644 --- a/libraries/SoftwareSerial/SoftwareSerial.h +++ b/libraries/SoftwareSerial/SoftwareSerial.h @@ -101,6 +101,7 @@ public: virtual int read(); virtual int available(); virtual void flush(); + operator bool() { return true; } using Print::write; -- cgit v1.2.3-18-g5258