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.

79 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1991 - 2001 Microsoft Corporation
  3. Module Name:
  4. ### ## # ## ## ## ##### ## ## ##### ### ##### ## ##
  5. ## # ## ### ## ## ## ## ## ## ## ## ### ## ## ## ##
  6. ### ## ### ## #### ## #### ## ## ## ## ## ## ## ##
  7. ### ## # # ## ### ##### #### ## ## ## ## ## ## #######
  8. ### ### ### #### ## ## ##### ####### ## ## ## ##
  9. # ## ### ### ## ## ## ## ## ## ## ## ## ## ## ##
  10. ### ## ## ## ## ##### ## ## ## ## ##### ## ## ##
  11. Abstract:
  12. The module is the header file for the ServerWorks
  13. keypad miniport device driver.
  14. Author:
  15. Wesley Witt (wesw) 1-Oct-2001
  16. Environment:
  17. Kernel mode only.
  18. Notes:
  19. --*/
  20. extern "C" {
  21. #include <ntddk.h>
  22. #include <stdio.h>
  23. }
  24. #define MINIPORT_DEVICE_TYPE SA_DEVICE_KEYPAD
  25. #include "saport.h"
  26. #define MAX_KEY_BUFF_SIZE 32
  27. #define KEYPAD_DATA_PRESSED 0x80
  28. #define KEYPAD_DATA_INTERRUPT_ENABLE 0x40
  29. #define KEYPAD_DATA_ENTER 0x20
  30. #define KEYPAD_DATA_ESCAPE 0x10
  31. #define KEYPAD_DATA_RIGHT 0x08
  32. #define KEYPAD_DATA_LEFT 0x04
  33. #define KEYPAD_DATA_DOWN 0x02
  34. #define KEYPAD_DATA_UP 0x01
  35. #define KEYPAD_ALL_KEYS (KEYPAD_DATA_ENTER|KEYPAD_DATA_ESCAPE|KEYPAD_DATA_RIGHT|KEYPAD_DATA_LEFT|KEYPAD_DATA_DOWN|KEYPAD_DATA_UP)
  36. typedef struct _DEVICE_EXTENSION {
  37. PUCHAR PortAddress;
  38. PUCHAR DataBuffer;
  39. UCHAR Keypress;
  40. KSPIN_LOCK KeypadLock;
  41. } DEVICE_EXTENSION, *PDEVICE_EXTENSION;
  42. //
  43. // prototypes
  44. //
  45. extern "C" {
  46. NTSTATUS
  47. DriverEntry(
  48. IN PDRIVER_OBJECT DriverObject,
  49. IN PUNICODE_STRING RegistryPath
  50. );
  51. } // extern "C"