Simple sample of using a debug class and macros.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers debug.cpp Source File

debug.cpp

00001 #include "mbed.h"
00002 #include "debug.h"
00003 
00004 
00005 Serial  g_console(USBTX, USBRX);
00006 
00007 
00008 #ifdef DEBUG
00009 
00010 debug   g_debugger;
00011 
00012 
00013 
00014 void debug::error(const char* text)
00015 {
00016     g_console.printf("!!!!!!!!!!!!!!!!! %s\n", text);
00017 }
00018 
00019 
00020 #endif