aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/USBAPI.h
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2012-04-01 12:54:35 -0400
committerZach Eveland <zeveland@blacklabel-development.com>2012-04-01 12:54:35 -0400
commita984b581a8ad093b55ec9f2d4677afdd77bf4705 (patch)
treec3f4c2119b2c2129d8948b872920a235286dbb40 /cores/arduino/USBAPI.h
parent1534b2b730af952d836ecaf79563fa54f689720b (diff)
added Boolean operators to HardwareSerial and CDC to test whether the port is ready to send data.
Mostly useful for Leonardo - simple way to test whether the port is actually opened by an application and ready to receive data. For Serial objects attached to real UARTs always returns true.
Diffstat (limited to 'cores/arduino/USBAPI.h')
-rw-r--r--cores/arduino/USBAPI.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cores/arduino/USBAPI.h b/cores/arduino/USBAPI.h
index 5169e65..f66cb16 100644
--- a/cores/arduino/USBAPI.h
+++ b/cores/arduino/USBAPI.h
@@ -39,6 +39,7 @@ public:
virtual int read(void);
virtual void flush(void);
virtual size_t write(uint8_t);
+ operator bool();
};
extern Serial_ Serial;