Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
2.5 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 2000 - 2001
  3. Module Name:
  4. dbg.h
  5. Abstract:
  6. Debug Code for 1394 drivers.
  7. Environment:
  8. kernel mode only
  9. Notes:
  10. Revision History:
  11. 03-02-2001 Switch to use TraceMask instead of DebugLevel
  12. --*/
  13. #ifndef _DBG_INC
  14. #define _DBG_INC
  15. //
  16. // Various definitions
  17. //
  18. #if 1
  19. extern LONG MSDVCRMutextUseCount;
  20. #endif
  21. #if DBG
  22. #define _DRIVERNAME_ "MSTape"
  23. // PnP: loading, power state, surprise removal, device SRB
  24. #define TL_PNP_MASK 0x0000000F
  25. #define TL_PNP_INFO 0x00000001
  26. #define TL_PNP_TRACE 0x00000002
  27. #define TL_PNP_WARNING 0x00000004
  28. #define TL_PNP_ERROR 0x00000008
  29. // Connection, plug and 61883 info (get/set)
  30. #define TL_61883_MASK 0x000000F0
  31. #define TL_61883_INFO 0x00000010
  32. #define TL_61883_TRACE 0x00000020
  33. #define TL_61883_WARNING 0x00000040
  34. #define TL_61883_ERROR 0x00000080
  35. // Data
  36. #define TL_CIP_MASK 0x00000F00
  37. #define TL_CIP_INFO 0x00000100
  38. #define TL_CIP_TRACE 0x00000200
  39. #define TL_CIP_WARNING 0x00000400
  40. #define TL_CIP_ERROR 0x00000800
  41. // AVC commands
  42. #define TL_FCP_MASK 0x0000F000
  43. #define TL_FCP_INFO 0x00001000
  44. #define TL_FCP_TRACE 0x00002000
  45. #define TL_FCP_WARNING 0x00004000
  46. #define TL_FCP_ERROR 0x00008000
  47. // Stream (data intersection, open/close, stream state (get/set))
  48. #define TL_STRM_MASK 0x000F0000
  49. #define TL_STRM_INFO 0x00010000
  50. #define TL_STRM_TRACE 0x00020000
  51. #define TL_STRM_WARNING 0x00040000
  52. #define TL_STRM_ERROR 0x00080000
  53. // clock and clock event
  54. #define TL_CLK_MASK 0x00F00000
  55. #define TL_CLK_INFO 0x00100000
  56. #define TL_CLK_TRACE 0x00200000
  57. #define TL_CLK_WARNING 0x00400000
  58. #define TL_CLK_ERROR 0x00800000
  59. extern ULONG TapeTraceMask;
  60. extern ULONG TapeAssertLevel;
  61. #define TRAP DbgBreakPoint();
  62. #define TRACE( l, x ) \
  63. if( (l) & TapeTraceMask ) { \
  64. KdPrint( (_DRIVERNAME_ ": ") ); \
  65. KdPrint( x ); \
  66. }
  67. #ifdef ASSERT
  68. #undef ASSERT
  69. #endif
  70. #define ASSERT( exp ) \
  71. if (TapeAssertLevel && !(exp)) \
  72. RtlAssert( #exp, __FILE__, __LINE__, NULL )
  73. #else // #if DBG
  74. #define TRACE( l, x )
  75. #endif // #if DBG
  76. #endif