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 LogUtil by
Revision 4:cf2ada8ed11b, committed 2013-04-14
- Comitter:
- sam_grove
- Date:
- Sun Apr 14 22:34:13 2013 +0000
- Parent:
- 3:9f20058284bd
- Child:
- 6:163b9d47fa87
- Commit message:
- Added Serial object as public member rather than local to the constructor. Need to think about how to abstract this and re-route the content.
Changed in this revision
| LogUtil.cpp | Show annotated file Show diff for this revision Revisions of this file |
| LogUtil.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/LogUtil.cpp Wed Apr 10 06:18:50 2013 +0000
+++ b/LogUtil.cpp Sun Apr 14 22:34:13 2013 +0000
@@ -23,9 +23,8 @@
#include "LogUtil.h"
#include "mbed.h"
- LogUtil::LogUtil()
+ LogUtil::LogUtil() : debug(USBTX, USBRX)
{
- Serial debug(USBTX, USBRX);
debug.baud(921600);
debug.printf("\033[2J"); // clear the terminal
debug.printf("\033[1;1H");// and set the cursor to home
@@ -33,4 +32,5 @@
return;
}
+
\ No newline at end of file
--- a/LogUtil.h Wed Apr 10 06:18:50 2013 +0000
+++ b/LogUtil.h Sun Apr 14 22:34:13 2013 +0000
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "mbed.h"
#define STREAM stdout
#define LOG(...) \
@@ -77,6 +78,7 @@
/** Construct the LogUtil class and configure
*/
LogUtil();
+ Serial debug;
};
