This repository was archived by the owner on Apr 24, 2019. It is now read-only.
File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 9
9
"license" : " Apache-2.0" ,
10
10
"extraIncludes" : [],
11
11
"dependencies" : {
12
- "mbed-client" : " ^1.0.0"
12
+ "mbed-client" : " ^1.0.0" ,
13
+ "mbed-trace" : " ^1.0.0"
13
14
},
14
15
"targetDependencies" : {},
15
16
"bin" : " ./source/"
Original file line number Diff line number Diff line change 21
21
#include < string>
22
22
#include < sstream>
23
23
#include < vector>
24
+ #include " mbed-trace/mbed_trace.h"
24
25
25
26
using namespace mbed ::util;
26
27
@@ -43,6 +44,11 @@ MbedClient mbed_client(device);
43
44
InterruptIn obs_button (SW2);
44
45
InterruptIn unreg_button (SW3);
45
46
47
+ // debug printf function
48
+ void trace_printer (const char * str) {
49
+ printf (" %s\r\n " , str);
50
+ }
51
+
46
52
// LED Output
47
53
DigitalOut led1 (LED1);
48
54
@@ -196,7 +202,8 @@ void app_start(int /*argc*/, char* /*argv*/[]) {
196
202
}
197
203
output.printf (" IP address %s\r\n " , eth.getIPAddress ());
198
204
output.printf (" Device name %s\r\n " , MBED_ENDPOINT_NAME);
199
-
205
+ mbed_trace_init ();
206
+ mbed_trace_print_function_set (trace_printer);
200
207
// we create our button and LED resources
201
208
auto button_resource = new ButtonResource ();
202
209
auto led_resource = new LedResource ();
You can’t perform that action at this time.
0 commit comments