Trace management. More...
#include "awt_std.h"#include <string.h>#include <assert.h>#include <stdlib.h>#include <stdio.h>#include <stdarg.h>Defines | |
| #define | AWT_TRACE(lvl, fmt,...) do { if (lvl) printer(#lvl":\t"fmt"\n", ## __VA_ARGS__); } while(0) |
| Trace function. | |
Trace management.
This header provides a trace function, which implementation will depend on hardware device.
| #define AWT_TRACE | ( | lvl, | |||
| fmt, | |||||
| ... | ) | do { if (lvl) printer(#lvl":\t"fmt"\n", ## __VA_ARGS__); } while(0) |
Trace function.
| lvl | level used to determine if the trace has to be done. Level must be an integer different of 0 to activate the trace. | |
| fmt | the format string, like in stdio functions | |
| ... | the variable arguments to build the string to trace. |
//For instance, using level created like that: #define DEBUG_LEVEL_EXEMPLE 1 //used in a call like this one AWT_TRACE(DEBUG_LEVEL_EXEMPLE, "my format string with a number: [%d]", 42); //will produce: DEBUG_LEVEL_EXEMPLE my format string with a number: [42]
1.6.3