SUSHMITAH / btstack

Automatically exported from code.google.com/p/btstack
0 stars 0 forks source link

Please remove printf from source code #152

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is mostly done, but can we remove the remaining 'printf's throughout the 
stack source and replace with the 'log_dbg' and 'log_err'. Printf in the 
demo(s) code is OK.

For embedded applications 'log_dbg' seems to be nulled out, but 'log_err' is 
left in.

Can these be (optionally) redirected a serial port or event?
Simon.

Original issue reported on code.google.com by mungew...@gmail.com on 5 May 2011 at 5:54

GoogleCodeExporter commented 8 years ago
replacing the remaining printf and fprintf with log_dgb & log_err is fine. I 
started but just didn't finish that.

log_err and log_dbg are currently send to /dev/null if EMBEDDED is defined (see 
src/debug.h)

debug.h then can be changed to accommodate target requirements.

Original comment by matthias.ringwald@gmail.com on 5 May 2011 at 6:19

GoogleCodeExporter commented 8 years ago
well. I'll replace them right away... gimme 5 minutes..

Original comment by matthias.ringwald@gmail.com on 5 May 2011 at 6:20

GoogleCodeExporter commented 8 years ago
done in r1091

Original comment by matthias.ringwald@gmail.com on 5 May 2011 at 6:48