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 MTS-Serial by
Diff: MTSBufferedIO.cpp
- Revision:
- 11:4afbbafcd6b3
- Parent:
- 10:b18a1064dfc6
- Child:
- 12:e12b79a4ab4f
--- a/MTSBufferedIO.cpp	Fri Jan 23 16:52:25 2015 -0600
+++ b/MTSBufferedIO.cpp	Mon Mar 23 16:41:30 2015 -0500
@@ -14,6 +14,19 @@
 {
 }
 
+int MTSBufferedIO::writef(const char* format, ...) {
+    char buff[256];
+
+    va_list ap;
+    va_start(ap, format);
+    int len = vsnprintf(buff, 256, format, ap);
+    while (!writeable())
+        ;
+    write(buff, len);
+    va_end(ap);
+    return len;
+}
+
 int MTSBufferedIO::write(const char* data, int length, unsigned int timeoutMillis) 
 {
     //Writes until empty or timeout is reached (different implementation planned once tx isr is working)
    