lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | /*
|
| 2 | * (C) Copyright 2016, ZIXC Corporation.
|
| 3 | *
|
| 4 | */
|
| 5 |
|
| 6 | #ifndef __DEBUG_LEVEL_PRINTF__
|
| 7 | #define __DEBUG_LEVEL_PRINTF__
|
| 8 |
|
| 9 | #define UBOOT_ERR 1
|
| 10 | #define UBOOT_WARN 2
|
| 11 | #define UBOOT_NOTICE 3
|
| 12 | #define UBOOT_DBG 4
|
| 13 | #define UBOOT_INFO 5
|
| 14 |
|
| 15 | extern unsigned int g_uiDebugLevel;
|
| 16 |
|
| 17 | #define BOOT_PRINTF(Level, Fmt, Args...) \
|
| 18 | do{ \
|
| 19 | if (Level <= g_uiDebugLevel) \
|
| 20 | { \
|
| 21 | printf("[%s]<%d>"Fmt, __FUNCTION__, __LINE__, ##Args); \
|
| 22 | } \
|
| 23 | }while(0)
|
| 24 |
|
| 25 | #endif /* __DEBUG_LEVEL_PRINTF__ */
|
| 26 |
|