|
|
1.1 root 1: /*++
2:
3: Copyright (c) 1990, 1991, 1992, 1993 Microsoft Corporation
4:
5: Module Name:
6:
7: kbdclass.h
8:
9: Abstract:
10:
11: These are the structures and defines that are used in the
12: keyboard class driver.
13:
14: Revision History:
15:
16: --*/
17:
18: #ifndef _KBDCLASS_
19: #define _KBDCLASS_
20:
21: #include <ntddkbd.h>
22:
23: //
24: // Define the default number of elements in the class input data queue.
25: //
26:
27: #define DATA_QUEUE_SIZE 100
28:
29: //
30: // Class device extension.
31: //
32:
33: typedef struct _DEVICE_EXTENSION {
34:
35: //
36: // Flag that indicates whether there is currently a request held pending
37: // by StartIo.
38: //
39:
40: BOOLEAN RequestIsPending;
41:
42: //
43: // Flag that indicates whether the cleanup routine has been initiated.
44: //
45:
46: BOOLEAN CleanupWasInitiated;
47:
48: //
49: // Number of input data items currently in the InputData queue.
50: //
51:
52: ULONG InputCount;
53:
54: //
55: // Start of the class input data queue (really a circular buffer).
56: //
57:
58: PKEYBOARD_INPUT_DATA InputData;
59:
60: //
61: // Insertion pointer for InputData.
62: //
63:
64: PKEYBOARD_INPUT_DATA DataIn;
65:
66: //
67: // Removal pointer for InputData.
68: //
69:
70: PKEYBOARD_INPUT_DATA DataOut;
71:
72: //
73: // Keyboard attributes.
74: //
75:
76: KEYBOARD_ATTRIBUTES KeyboardAttributes;
77:
78: //
79: // Spinlock used to synchronize access to the input data queue and its
80: // insertion/removal pointers.
81: //
82:
83: KSPIN_LOCK SpinLock;
84:
85: //
86: // Number of port drivers serviced by this class driver.
87: //
88:
89: ULONG MaximumPortsServiced;
90:
91: //
92: // Specifies the type of class-port connection to make. A '1'
93: // indicates a 1:1 relationship between class device objects and
94: // port device objects. A '0' indicates a 1:many relationship.
95: //
96:
97: ULONG ConnectOneClassToOnePort;
98:
99: //
100: // Pointer to the list of pointers to port device objects.
101: //
102:
103: PDEVICE_OBJECT *PortDeviceObjectList;
104:
105: //
106: // Request sequence number (used for error logging).
107: //
108:
109: ULONG SequenceNumber;
110:
111: //
112: // Indicates whether it is okay to log overflow errors.
113: //
114:
115: BOOLEAN OkayToLogOverflow;
116:
117: } DEVICE_EXTENSION, *PDEVICE_EXTENSION;
118:
119: //
120: // Keyboard configuration information.
121: //
122:
123: typedef struct _KEYBOARD_CONFIGURATION_INFORMATION {
124:
125: //
126: // Maximum size of class input data queue, in bytes.
127: //
128:
129: ULONG DataQueueSize;
130:
131: } KEYBOARD_CONFIGURATION_INFORMATION, *PKEYBOARD_CONFIGURATION_INFORMATION;
132:
133: #endif // _KBDCLASS_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.