1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef _IOCTL_DEBUG_H_
- #define _IOCTL_DEBUG_H_
- #include <drv_debug.h>
- //======================================================================
- extern unsigned int sisdbgconf1;
- extern unsigned int sisdbgconf2;
- #ifndef CONFIG_SUPPORT_DEBUG_MESSAGE
- #define UMFDBG(level, fmt, args...)
- #define UMFDBG2(level, fmt, args...)
- #else
- #define UMFDEBUG
- #ifdef UMFDEBUG
- #define UMFDBG(level, fmt, args...) do {if (sisdbgconf1 & DBGCFG_UMF) fprintf(stderr, "[UMF] " fmt, ## args);}while(0)
- #define UMFDBG2(level, fmt, args...) do {if (sisdbgconf1 & DBGCFG_UMF) fprintf(stderr, fmt, ## args);}while(0)
- #else
- #define UMFDBG(level, fmt, args...)
- #define UMFDBG2(level, fmt, args...)
- #endif
- #endif
- //======================================================================
- #define ENABLE_UMFDBG_PRINT_FUNCTION 0
- #if ENABLE_UMFDBG_PRINT_FUNCTION
- #define UMFDBG_FUNCIN(x) UMFDBG(0, "FUNC ==>, %s\n", __FUNCTION__)
- #define UMFDBG_FUNCOUT(x) UMFDBG(0, "<== FUNC, %s %d\n", __FUNCTION__, __LINE__)
- #else
- #define UMFDBG_FUNCIN(x)
- #define UMFDBG_FUNCOUT(x)
- #endif
- //======================================================================
- //#define printf(...)
- #endif
|