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.
Dependents: MbedSmartRestMain MbedSmartRestMain
Fork of C027_Support by
Diff: SerialPipe.cpp
- Revision:
- 75:ce6e12067d0c
- Parent:
- 74:208e3e32d263
- Child:
- 95:8282dbbe1492
diff -r 208e3e32d263 -r ce6e12067d0c SerialPipe.cpp
--- a/SerialPipe.cpp Thu May 15 22:20:42 2014 +0000
+++ b/SerialPipe.cpp Fri May 16 14:13:00 2014 +0000
@@ -39,11 +39,16 @@
do
{
int written = _pipeTx.put(ptr, count, false);
- ptr += written;
- count -= written;
- txStart();
+ if (written) {
+ ptr += written;
+ count -= written;
+ txStart();
+ }
+ else if (!blocking)
+ break;
+ RELAX_MS(0);
}
- while (count && blocking);
+ while (count);
}
return (length - count);
}
