This repository was archived by the owner on Apr 24, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 99 "license" : " Apache-2.0" ,
1010 "extraIncludes" : [],
1111 "dependencies" : {
12- "mbed-client" : " ^1.0.0"
12+ "mbed-client" : " ^1.0.0" ,
13+ "mbed-trace" : " ^1.0.0"
1314 },
1415 "targetDependencies" : {},
1516 "bin" : " ./source/"
Original file line number Diff line number Diff line change 2121#include < string>
2222#include < sstream>
2323#include < vector>
24+ #include " mbed-trace/mbed_trace.h"
2425
2526using namespace mbed ::util;
2627
@@ -43,6 +44,11 @@ MbedClient mbed_client(device);
4344InterruptIn obs_button (SW2);
4445InterruptIn unreg_button (SW3);
4546
47+ // debug printf function
48+ void trace_printer (const char * str) {
49+ printf (" %s\r\n " , str);
50+ }
51+
4652// LED Output
4753DigitalOut led1 (LED1);
4854
@@ -196,7 +202,8 @@ void app_start(int /*argc*/, char* /*argv*/[]) {
196202 }
197203 output.printf (" IP address %s\r\n " , eth.getIPAddress ());
198204 output.printf (" Device name %s\r\n " , MBED_ENDPOINT_NAME);
199-
205+ mbed_trace_init ();
206+ mbed_trace_print_function_set (trace_printer);
200207 // we create our button and LED resources
201208 auto button_resource = new ButtonResource ();
202209 auto led_resource = new LedResource ();
You can’t perform that action at this time.
0 commit comments