|
25 | 25 | extern uint8_t gDebugLevel;
|
26 | 26 | #define DBG_LEVEL gDebugLevel
|
27 | 27 |
|
28 |
| -#define DBG_PRINTF(level, format, ...) \ |
29 |
| - if (DBG_LEVEL >= level) \ |
30 |
| - printf("[XCP ] " format, __VA_ARGS__) |
31 |
| -#define DBG_PRINTF_ERROR(format, ...) \ |
32 |
| - if (DBG_LEVEL >= 1) \ |
33 |
| - printf("[XCP ] ERROR: " format, __VA_ARGS__) |
34 |
| -#define DBG_PRINTF_WARNING(format, ...) \ |
35 |
| - if (DBG_LEVEL >= 2) \ |
36 |
| - printf("[XCP ] WARNING: " format, __VA_ARGS__) |
37 |
| -#define DBG_PRINTF3(format, ...) \ |
38 |
| - if (DBG_LEVEL >= 3) \ |
39 |
| - printf("[XCP ] " format, __VA_ARGS__) |
40 |
| -#define DBG_PRINTF4(format, ...) \ |
41 |
| - if (DBG_LEVEL >= 4) \ |
42 |
| - printf("[XCP ] " format, __VA_ARGS__) |
43 |
| -#define DBG_PRINTF5(format, ...) \ |
44 |
| - if (DBG_LEVEL >= 5) \ |
45 |
| - printf("[XCP ] " format, __VA_ARGS__) |
| 28 | +#define DBG_PRINTF(level, format, ...) \ |
| 29 | + if (DBG_LEVEL >= level) \ |
| 30 | + printf("[XCP ] " format, __VA_ARGS__) |
| 31 | +#define DBG_PRINTF_ERROR(format, ...) \ |
| 32 | + if (DBG_LEVEL >= 1) \ |
| 33 | + printf("[XCP ] ERROR: " format, __VA_ARGS__) |
| 34 | +#define DBG_PRINTF_WARNING(format, ...) \ |
| 35 | + if (DBG_LEVEL >= 2) \ |
| 36 | + printf("[XCP ] WARNING: " format, __VA_ARGS__) |
| 37 | +#define DBG_PRINTF3(format, ...) \ |
| 38 | + if (DBG_LEVEL >= 3) \ |
| 39 | + printf("[XCP ] " format, __VA_ARGS__) |
| 40 | +#define DBG_PRINTF4(format, ...) \ |
| 41 | + if (DBG_LEVEL >= 4) \ |
| 42 | + printf("[XCP ] " format, __VA_ARGS__) |
| 43 | +#define DBG_PRINTF5(format, ...) \ |
| 44 | + if (DBG_LEVEL >= 5) \ |
| 45 | + printf("[XCP ] " format, __VA_ARGS__) |
46 | 46 |
|
47 |
| -#define DBG_PRINT(level, format) \ |
48 |
| - if (DBG_LEVEL >= level) \ |
49 |
| - printf("[XCP ] " format) |
50 |
| -#define DBG_PRINT_ERROR(format) \ |
51 |
| - if (DBG_LEVEL >= 1) \ |
52 |
| - printf("[XCP ] ERROR: " format) |
53 |
| -#define DBG_PRINT_WARNING(format) \ |
54 |
| - if (DBG_LEVEL >= 2) \ |
55 |
| - printf("[XCP ] WARNING: " format) |
56 |
| -#define DBG_PRINT3(format) \ |
57 |
| - if (DBG_LEVEL >= 3) \ |
58 |
| - printf("[XCP ] " format) |
59 |
| -#define DBG_PRINT4(format) \ |
60 |
| - if (DBG_LEVEL >= 4) \ |
61 |
| - printf("[XCP ] " format) |
62 |
| -#define DBG_PRINT5(format) \ |
63 |
| - if (DBG_LEVEL >= 5) \ |
64 |
| - printf("[XCP ] " format) |
| 47 | +#define DBG_PRINT(level, format) \ |
| 48 | + if (DBG_LEVEL >= level) \ |
| 49 | + printf("[XCP ] " format) |
| 50 | +#define DBG_PRINT_ERROR(format) \ |
| 51 | + if (DBG_LEVEL >= 1) \ |
| 52 | + printf("[XCP ] ERROR: " format) |
| 53 | +#define DBG_PRINT_WARNING(format) \ |
| 54 | + if (DBG_LEVEL >= 2) \ |
| 55 | + printf("[XCP ] WARNING: " format) |
| 56 | +#define DBG_PRINT3(format) \ |
| 57 | + if (DBG_LEVEL >= 3) \ |
| 58 | + printf("[XCP ] " format) |
| 59 | +#define DBG_PRINT4(format) \ |
| 60 | + if (DBG_LEVEL >= 4) \ |
| 61 | + printf("[XCP ] " format) |
| 62 | +#define DBG_PRINT5(format) \ |
| 63 | + if (DBG_LEVEL >= 5) \ |
| 64 | + printf("[XCP ] " format) |
65 | 65 |
|
66 | 66 | #else
|
67 | 67 |
|
|
0 commit comments