| 1 | = DEBUG_MSG = |
| 2 | Display a message on the serial or telnet console |
| 3 | |
| 4 | {{{ |
| 5 | DEBUG_MSG(fmt, …) |
| 6 | }}} |
| 7 | |
| 8 | == Parameters == |
| 9 | |
| 10 | * fmt - message or format to display |
| 11 | * … - variable parameters for message |
| 12 | |
| 13 | == Return Value == |
| 14 | |
| 15 | * void - no return value |
| 16 | |
| 17 | == Remarks == |
| 18 | |
| 19 | Similar to using printf for debug message but output messages will only be compiled into debug build. Release builds will not compile in the message so there is no overhead for release build. |
| 20 | |
| 21 | == Examples == |
| 22 | |
| 23 | {{{ |
| 24 | |
| 25 | int i; |
| 26 | for(i = 0; i < 3; i++) |
| 27 | { |
| 28 | DEBUG_MSG("About to do something here i = %d\r\n", i); |
| 29 | // Do something |
| 30 | } |
| 31 | }}} |
| 32 | |
| 33 | |
| 34 | == See Also == |
| 35 | |
| 36 | * [wiki:DEBUG_SHOWDATA DEBUG_SHOWDATA] |
| 37 | |