ioctl_debug.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _IOCTL_DEBUG_H_
  2. #define _IOCTL_DEBUG_H_
  3. #include <drv_debug.h>
  4. //======================================================================
  5. extern unsigned int sisdbgconf1;
  6. extern unsigned int sisdbgconf2;
  7. #ifndef CONFIG_SUPPORT_DEBUG_MESSAGE
  8. #define UMFDBG(level, fmt, args...)
  9. #define UMFDBG2(level, fmt, args...)
  10. #else
  11. #define UMFDEBUG
  12. #ifdef UMFDEBUG
  13. #define UMFDBG(level, fmt, args...) do {if (sisdbgconf1 & DBGCFG_UMF) fprintf(stderr, "[UMF] " fmt, ## args);}while(0)
  14. #define UMFDBG2(level, fmt, args...) do {if (sisdbgconf1 & DBGCFG_UMF) fprintf(stderr, fmt, ## args);}while(0)
  15. #else
  16. #define UMFDBG(level, fmt, args...)
  17. #define UMFDBG2(level, fmt, args...)
  18. #endif
  19. #endif
  20. //======================================================================
  21. #define ENABLE_UMFDBG_PRINT_FUNCTION 0
  22. #if ENABLE_UMFDBG_PRINT_FUNCTION
  23. #define UMFDBG_FUNCIN(x) UMFDBG(0, "FUNC ==>, %s\n", __FUNCTION__)
  24. #define UMFDBG_FUNCOUT(x) UMFDBG(0, "<== FUNC, %s %d\n", __FUNCTION__, __LINE__)
  25. #else
  26. #define UMFDBG_FUNCIN(x)
  27. #define UMFDBG_FUNCOUT(x)
  28. #endif
  29. //======================================================================
  30. //#define printf(...)
  31. #endif