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 daplink-validation by
Diff: main.cpp
- Revision:
- 10:8f171987d9a2
- Parent:
- 9:17b6e12e46ab
- Child:
- 11:79bb70065356
diff -r 17b6e12e46ab -r 8f171987d9a2 main.cpp
--- a/main.cpp Tue Sep 13 14:29:06 2016 +0000
+++ b/main.cpp Thu Sep 15 19:34:29 2016 +0000
@@ -77,13 +77,13 @@
while (1) {
// Enqueue data as it arrives
- if (pc.readable()) {
+ while (pc.readable()) {
val = pc.getc();
buf.enqueue(val);
}
// Process and send data
- if (pc.writeable() && !buf.empty()) {
+ if (!buf.empty()) {
val = buf.dequeue();
// Check for overflow. Leave space for
// a null terminating character
