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.

73 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. oembutton.h
  5. Abstract: Contains OEM specific definitions.
  6. Environment:
  7. Kernel mode
  8. Author:
  9. Michael Tsang (MikeTs) 13-Apr-2000
  10. Revision History:
  11. --*/
  12. #ifndef _OEMBUTTON_H
  13. #define _OEMBUTTON_H
  14. //
  15. // Constants
  16. //
  17. #define OEM_VENDOR_ID 0x3666 //"MSF"
  18. #define OEM_PRODUCT_ID 0x1234
  19. #define OEM_VERSION_NUM 1
  20. #define OEM_BUTTON_DEBOUNCE_TIME 10 //10msec
  21. //
  22. // Button ports
  23. //
  24. #define PORT_BUTTONSTATUS(devext) (PUCHAR)((devext)->IORes.u.Port.Start.LowPart)
  25. #define BUTTON_STATUS_MASK 0x1f
  26. #define BUTTON_INTERRUPT_MASK 0x80
  27. #define BUTTON_VALID_BITS (BUTTON_STATUS_MASK | \
  28. BUTTON_INTERRUPT_MASK)
  29. //
  30. // Macros
  31. //
  32. #define READBUTTONSTATE(devext) (~READ_PORT_UCHAR( \
  33. PORT_BUTTONSTATUS(devext)) & \
  34. BUTTON_VALID_BITS)
  35. //
  36. // Type definitions
  37. //
  38. //
  39. // This must match with hardware, so make sure it is byte aligned.
  40. //
  41. #include <pshpack1.h>
  42. typedef struct _OEM_INPUT_REPORT
  43. {
  44. UCHAR ButtonState;
  45. } OEM_INPUT_REPORT, *POEM_INPUT_REPORT;
  46. //
  47. // Global Data Declarations
  48. //
  49. extern UCHAR gReportDescriptor[32];
  50. extern HID_DESCRIPTOR gHidDescriptor;
  51. extern PWSTR gpwstrManufacturerID;
  52. extern PWSTR gpwstrProductID;
  53. extern PWSTR gpwstrSerialNumber;
  54. #endif //ifndef _OEMBUTTON_H