Leaked source code of windows server 2003
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.

103 lines
3.3 KiB

  1. /***************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. Dot4Usb.sys - Lower Filter Driver for Dot4.sys for USB connected
  5. IEEE 1284.4 devices.
  6. File Name:
  7. Debug.h
  8. Abstract:
  9. Debug defines
  10. Environment:
  11. Kernel mode only
  12. Notes:
  13. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  14. KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  15. IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  16. PURPOSE.
  17. Copyright (c) 2000 Microsoft Corporation. All Rights Reserved.
  18. Revision History:
  19. 01/18/2000 : created
  20. Author(s):
  21. Doug Fritz (DFritz)
  22. Joby Lafky (JobyL)
  23. ****************************************************************************/
  24. #define BREAK_ON_DRIVER_ENTRY 0x00000001
  25. #define BREAK_ON_DRIVER_UNLOAD 0x00000002
  26. #define TRACE_LOAD_UNLOAD 0x00000001 // DriverEntry, Unload
  27. #define TRACE_FAIL 0x00000002 // Trace Failures/Errors
  28. #define TRACE_FUNC_ENTER 0x00000004 // Enter Function - may include params
  29. #define TRACE_FUNC_EXIT 0x00000008 // Exit Function - may include return value(s)
  30. #define TRACE_PNP1 0x00000010 // AddDevice, Start, Remove - minimal info
  31. #define TRACE_PNP2 0x00000020
  32. #define TRACE_PNP4 0x00000040
  33. #define TRACE_PNP8 0x00000080 // PnP error paths
  34. #define TRACE_USB1 0x00000100 // interface to USB
  35. #define TRACE_USB2 0x00000200
  36. #define TRACE_USB4 0x00000400
  37. #define TRACE_USB8 0x00000800
  38. #define TRACE_DOT41 0x00001000 // interface to dot4.sys loaded above us
  39. #define TRACE_DOT42 0x00002000
  40. #define TRACE_DOT44 0x00004000
  41. #define TRACE_DOT48 0x00008000
  42. #define TRACE_TMP1 0x00010000 // temp usage for development and debugging
  43. #define TRACE_TMP2 0x00020000
  44. #define TRACE_TMP4 0x00040000
  45. #define TRACE_TMP8 0x00080000
  46. #define TRACE_VERBOSE 0x80000000 // stuff that normally is too verbose
  47. #define _DBG 1
  48. #if _DBG
  49. // Trace If (...condition...)
  50. #define TR_IF(_test_, _x_) \
  51. if( (_test_) & gTrace ) { \
  52. DbgPrint("D4U: "); \
  53. DbgPrint _x_; \
  54. DbgPrint("\n"); \
  55. }
  56. #define TR_LD_UNLD(_x_) TR_IF(TRACE_LOAD_UNLOAD, _x_) // DriverEntry, DriverUnload
  57. #define TR_FAIL(_x_) TR_IF(TRACE_FAIL, _x_) // Failures/Errors
  58. #define TR_ENTER(_x_) TR_IF(TRACE_FUNC_ENTER, _x_)
  59. #define TR_EXIT(_x_) TR_IF(TRACE_FUNC_EXIT, _x_)
  60. #define TR_PNP1(_x_) TR_IF(TRACE_PNP1, _x_) // minimal AddDevice, Start, Remove
  61. #define TR_PNP2(_x_) TR_IF(TRACE_PNP2, _x_) // verbose PnP
  62. #define TR_PNP8(_x_) TR_IF(TRACE_PNP8, _x_) // error paths in PnP functions
  63. #define TR_VERBOSE(_x_) TR_IF(TRACE_VERBOSE, _x_) // stuff that normally is too verbose
  64. #define TR_DOT41(_x_) TR_IF(TRACE_DOT41, _x_)
  65. #define TR_TMP1(_x_) TR_IF(TRACE_TMP1, _x_)
  66. #endif // _DBG
  67. #define ALLOW_D4U_ASSERTS 1
  68. #if ALLOW_D4U_ASSERTS
  69. #define D4UAssert(_x_) ASSERT(_x_)
  70. #else
  71. #define D4UAssert(_x_)
  72. #endif // ALLOW_D4U_ASSERTS