fork of Sam Grove's library
Fork of LogUtil by
Diff: LogUtil.cpp
- Revision:
- 7:ef45bd2cd9bb
- Parent:
- 4:cf2ada8ed11b
- Child:
- 8:efb8e1e2679f
--- a/LogUtil.cpp Wed May 01 03:51:03 2013 +0000 +++ b/LogUtil.cpp Fri May 10 18:36:27 2013 +0000 @@ -23,14 +23,15 @@ #include "LogUtil.h" #include "mbed.h" - LogUtil::LogUtil() : debug(USBTX, USBRX) - { - debug.baud(921600); - debug.printf("\033[2J"); // clear the terminal - debug.printf("\033[1;1H");// and set the cursor to home +LogUtil::LogUtil(Serial &serial, uint32_t baudrate) +{ + _serial = &serial; + (baudrate > 0) ? _serial->baud(baudrate) : __nop(); + _serial->printf("\033[2J"); // clear the terminal + _serial->printf("\033[1;1H");// and set the cursor to home wait(0.5f); return; - } - +} + \ No newline at end of file