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.h
- Revision:
- 11:4afbbafcd6b3
- Parent:
- 8:6fa39b584321
--- a/MTSBufferedIO.h Fri Jan 23 16:52:25 2015 -0600
+++ b/MTSBufferedIO.h Mon Mar 23 16:41:30 2015 -0500
@@ -2,6 +2,7 @@
#define MTSBUFFEREDIO_H
#include "MTSCircularBuffer.h"
+#include <cstdarg>
namespace mts {
@@ -51,7 +52,16 @@
* @returns the number of bytes written to the buffer, which should be
* equal to the length parameter since this method blocks.
*/
- int write(const char* data, int length);
+ int write(const char* data, int length);
+
+ /** This method enables bulk writes to the Tx or write buffer. This method
+ * blocks until all the bytes are written.
+ *
+ * @param format of the string to be written.
+ * @param additional arguments will be placed in the format string.
+ * @returns the number of bytes written to the buffer.
+ */
+ int writef(const char* format, ... );
/** This method attempts to write a single byte to the tx buffer
* within the timeout period.
