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.

108 lines
2.2 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1999 - 2000
  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. --*/
  12. #ifndef _DBG_INC
  13. #define _DBG_INC
  14. //
  15. // Various definitions
  16. //
  17. #if DBG
  18. #define _DRIVERNAME_ "MSDV"
  19. // PnP: loading, power state, surprise removal, device SRB
  20. #define TL_PNP_MASK 0x0000000F
  21. #define TL_PNP_INFO 0x00000001
  22. #define TL_PNP_TRACE 0x00000002
  23. #define TL_PNP_WARNING 0x00000004
  24. #define TL_PNP_ERROR 0x00000008
  25. // Connection, plug and 61883 info (get/set)
  26. #define TL_61883_MASK 0x000000F0
  27. #define TL_61883_INFO 0x00000010
  28. #define TL_61883_TRACE 0x00000020
  29. #define TL_61883_WARNING 0x00000040
  30. #define TL_61883_ERROR 0x00000080
  31. // Data
  32. #define TL_CIP_MASK 0x00000F00
  33. #define TL_CIP_INFO 0x00000100
  34. #define TL_CIP_TRACE 0x00000200
  35. #define TL_CIP_WARNING 0x00000400
  36. #define TL_CIP_ERROR 0x00000800
  37. // AVC commands
  38. #define TL_FCP_MASK 0x0000F000
  39. #define TL_FCP_INFO 0x00001000
  40. #define TL_FCP_TRACE 0x00002000
  41. #define TL_FCP_WARNING 0x00004000
  42. #define TL_FCP_ERROR 0x00008000
  43. // Stream (data intersection, open/close, stream state (get/set))
  44. #define TL_STRM_MASK 0x000F0000
  45. #define TL_STRM_INFO 0x00010000
  46. #define TL_STRM_TRACE 0x00020000
  47. #define TL_STRM_WARNING 0x00040000
  48. #define TL_STRM_ERROR 0x00080000
  49. // clock and clock event
  50. #define TL_CLK_MASK 0x00F00000
  51. #define TL_CLK_INFO 0x00100000
  52. #define TL_CLK_TRACE 0x00200000
  53. #define TL_CLK_WARNING 0x00400000
  54. #define TL_CLK_ERROR 0x00800000
  55. extern ULONG DVTraceMask;
  56. extern ULONG DVAssertLevel;
  57. #define TRAP DbgBreakPoint();
  58. #define TRACE( l, x ) \
  59. if( (l) & DVTraceMask ) { \
  60. KdPrint( (_DRIVERNAME_ ": ") ); \
  61. KdPrint( x ); \
  62. }
  63. #ifdef ASSERT
  64. #undef ASSERT
  65. #endif
  66. #define ASSERT( exp ) \
  67. if (DVAssertLevel && !(exp)) \
  68. RtlAssert( #exp, __FILE__, __LINE__, NULL )
  69. #else // #if DBG
  70. #define TRAP
  71. #define TRACE( l, x )
  72. #endif // #if DBG
  73. #endif