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.

74 lines
1.7 KiB

  1. #ifndef _WDM_COMMON_H_
  2. #define _WDM_COMMON_H_
  3. #define ENSURE do
  4. #define END_ENSURE while( FALSE)
  5. #define FAIL break
  6. // WDM MiniDriver Error codes
  7. #define WDMMINI_NOERROR 0x0000
  8. #define WDMMINI_INVALIDPARAM 0x0010
  9. #define WDMMINI_NOHARDWARE 0x0020
  10. #define WDMMINI_UNKNOWNHARDWARE 0x0021
  11. #define WDMMINI_HARDWAREFAILURE 0x0022
  12. #define WDMMINI_ERROR_NOI2CPROVIDER 0x0040
  13. #define WDMMINI_ERROR_NOGPIOPROVIDER 0x0041
  14. #define WDMMINI_ERROR_MEMORYALLOCATION 0x0080
  15. #define WDMMINI_ERROR_REGISTRY 0x0081
  16. #define WDMMINI_ERROR 0x8000
  17. // EEPROM address on the board.
  18. #define BOARD_EEPROM_ADDRESS 0xA6
  19. // Register structure
  20. typedef struct
  21. {
  22. UINT uiAddress; // Register address
  23. UINT uiLength; // Length
  24. UCHAR *p_ucBuffer; // Data
  25. } RegisterType;
  26. // Status Command enumeration
  27. typedef enum
  28. {
  29. PLL_OFFSET,
  30. PLL_LOCK
  31. }IF_STATUS_ENUM;
  32. typedef struct _IFStatus {
  33. ULONG StatusCommand; // Status command
  34. ULONG Data; // Status Data to be returned
  35. } IFStatus, *PIFStatus;
  36. // this is the Interface definition for IF interface
  37. //
  38. typedef NTSTATUS (STDMETHODCALLTYPE *IFMODE)(PVOID, ULONG);
  39. typedef NTSTATUS (STDMETHODCALLTYPE *IFSTATUS)(PVOID, PIFStatus);
  40. typedef struct {
  41. INTERFACE _vddInterface;
  42. IFMODE SetIFMode;
  43. IFSTATUS GetIFStatus;
  44. } IFINTERFACE, *PIFINTERFACE;
  45. // Diagnostic stream's property structures
  46. // Enumeration for the Diagnostic modes
  47. typedef enum
  48. {
  49. TENPOINT76MHZ,
  50. TWOPOINT69MHZ,
  51. TWENTYONEPOINT52MHZ,
  52. }DIAGNOSTIC_MODE_ENUM;
  53. // The size of the data sample field
  54. typedef enum
  55. {
  56. DIAG_FIELD,
  57. DATA_FIELD,
  58. } DIAGNOSTIC_TYPE_ENUM;
  59. #endif // _WDM_COMMON_H_