fork of Sam Grove's library

Fork of LogUtil by Sam Grove

Files at this revision

API Documentation at this revision

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;
     
 };