Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of USBDevice by
Diff: USBSerial/USBSerial.cpp
- Revision:
- 70:2c525a50f1b6
- Parent:
- 47:a0cd9646ecd1
--- a/USBSerial/USBSerial.cpp Fri Nov 11 17:59:00 2016 +0000
+++ b/USBSerial/USBSerial.cpp Thu Jul 20 10:14:36 2017 +0100
@@ -56,8 +56,9 @@
buf.queue(c[i]);
}
- //call a potential handler
- rx.call();
+ //call a potential handlenr
+ if (rx)
+ rx.call();
return true;
}
@@ -65,3 +66,7 @@
uint8_t USBSerial::available() {
return buf.available();
}
+
+bool USBSerial::connected() {
+ return terminal_connected;
+}
