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 MODSERIAL by
Revision 38:f42def64c4ee, committed 2013-10-12
- Comitter:
- Sissors
- Date:
- Sat Oct 12 09:53:06 2013 +0000
- Parent:
- 37:b90b20f78f04
- Child:
- 39:a65f89de75c5
- Child:
- 40:e84b8ad1d98b
- Commit message:
- Improved claim documentation
Changed in this revision
| ChangeLog.c | Show annotated file Show diff for this revision Revisions of this file |
| MODSERIAL.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ChangeLog.c Fri Oct 11 18:31:01 2013 +0000
+++ b/ChangeLog.c Sat Oct 12 09:53:06 2013 +0000
@@ -1,4 +1,7 @@
/* $Id:$
+1.32 12th October 2013
+ * Improved claim documentation: http://mbed.org/questions/1817/Redirect-stdout-via-MODSERIAL-is-this-po/ by http://mbed.org/users/WiredHome/
+
1.31 11th October 2013
* Added claim function to redirect for example stdout
--- a/MODSERIAL.h Fri Oct 11 18:31:01 2013 +0000
+++ b/MODSERIAL.h Sat Oct 12 09:53:06 2013 +0000
@@ -734,7 +734,19 @@
*
* Redirect a stream to this MODSERIAL object
*
- * Important: A name parameter must have been added when creating the MODSERIAL object
+ * Important: A name parameter must have been added when creating the MODSERIAL object:
+ *
+ * @code
+ * #include "MODSERIAL.h"
+ * ...
+ * MODSERIAL pc(USBTX, USBRX, "modser");
+ *
+ * int main() {
+ * pc.claim() // capture <stdout>
+ * pc.printf("Uses the MODSERIAL library\r\n");
+ * printf("So does this!\r\n");
+ * }
+ * @endcode
*
* @ingroup API
* @param FILE *stream The stream to redirect (default = stdout)
