VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/i8042prt/include/kbdmou.h@ 4612

Last change on this file since 4612 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.6 KB
Line 
1/*++
2
3Copyright (c) 1989 Microsoft Corporation
4
5Module Name:
6
7 kbdmou.h
8
9Abstract:
10
11 These are the structures and defines that are used in the
12 keyboard class driver, mouse class driver, and keyboard/mouse port
13 driver.
14
15Author:
16
17 lees
18
19Revision History:
20
21--*/
22
23#ifndef _KBDMOU_
24#define _KBDMOU_
25
26#include <ntddkbd.h>
27#include <ntddmou.h>
28
29//
30// Define the keyboard/mouse port device name strings.
31//
32
33#define DD_KEYBOARD_PORT_DEVICE_NAME "\\Device\\KeyboardPort"
34#define DD_KEYBOARD_PORT_DEVICE_NAME_U L"\\Device\\KeyboardPort"
35#define DD_KEYBOARD_PORT_BASE_NAME_U L"KeyboardPort"
36#define DD_POINTER_PORT_DEVICE_NAME "\\Device\\PointerPort"
37#define DD_POINTER_PORT_DEVICE_NAME_U L"\\Device\\PointerPort"
38#define DD_POINTER_PORT_BASE_NAME_U L"PointerPort"
39
40//
41// Define the keyboard/mouse class device name strings.
42//
43
44#define DD_KEYBOARD_CLASS_BASE_NAME_U L"KeyboardClass"
45#define DD_POINTER_CLASS_BASE_NAME_U L"PointerClass"
46
47//
48// Define the keyboard/mouse resource class names.
49//
50
51#define DD_KEYBOARD_RESOURCE_CLASS_NAME_U L"Keyboard"
52#define DD_POINTER_RESOURCE_CLASS_NAME_U L"Pointer"
53#define DD_KEYBOARD_MOUSE_COMBO_RESOURCE_CLASS_NAME_U L"Keyboard/Pointer"
54
55//
56// Define the maximum number of pointer/keyboard port names the port driver
57// will use in an attempt to IoCreateDevice.
58//
59
60#define POINTER_PORTS_MAXIMUM 8
61#define KEYBOARD_PORTS_MAXIMUM 8
62
63//
64// Define the port connection data structure.
65//
66
67typedef struct _CONNECT_DATA {
68 IN PDEVICE_OBJECT ClassDeviceObject;
69 IN PVOID ClassService;
70} CONNECT_DATA, *PCONNECT_DATA;
71
72//
73// Define the service callback routine's structure.
74//
75
76typedef
77VOID
78(*PSERVICE_CALLBACK_ROUTINE) (
79 IN PVOID NormalContext,
80 IN PVOID SystemArgument1,
81 IN PVOID SystemArgument2,
82 IN OUT PVOID SystemArgument3
83 );
84
85//
86// WMI structures returned by port drivers
87//
88#include <wmidata.h>
89
90//
91// NtDeviceIoControlFile internal IoControlCode values for keyboard device.
92//
93
94#define IOCTL_INTERNAL_KEYBOARD_CONNECT CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
95#define IOCTL_INTERNAL_KEYBOARD_DISCONNECT CTL_CODE(FILE_DEVICE_KEYBOARD,0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
96#define IOCTL_INTERNAL_KEYBOARD_ENABLE CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
97#define IOCTL_INTERNAL_KEYBOARD_DISABLE CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
98
99//
100// NtDeviceIoControlFile internal IoControlCode values for mouse device.
101//
102
103
104#define IOCTL_INTERNAL_MOUSE_CONNECT CTL_CODE(FILE_DEVICE_MOUSE, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
105#define IOCTL_INTERNAL_MOUSE_DISCONNECT CTL_CODE(FILE_DEVICE_MOUSE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
106#define IOCTL_INTERNAL_MOUSE_ENABLE CTL_CODE(FILE_DEVICE_MOUSE, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
107#define IOCTL_INTERNAL_MOUSE_DISABLE CTL_CODE(FILE_DEVICE_MOUSE, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
108
109//
110// Error log definitions (specific to the keyboard/mouse) for DumpData[0]
111// in the IO_ERROR_LOG_PACKET.
112//
113// DumpData[1] <= hardware port/register
114// DumpData[2] <= {command byte || expected response byte}
115// DumpData[3] <= {command's parameter byte || actual response byte}
116//
117//
118
119#define KBDMOU_COULD_NOT_SEND_COMMAND 0x0000
120#define KBDMOU_COULD_NOT_SEND_PARAM 0x0001
121#define KBDMOU_NO_RESPONSE 0x0002
122#define KBDMOU_INCORRECT_RESPONSE 0x0004
123
124//
125// Define the base values for the error log packet's UniqueErrorValue field.
126//
127
128#define I8042_ERROR_VALUE_BASE 1000
129#define INPORT_ERROR_VALUE_BASE 2000
130#define SERIAL_MOUSE_ERROR_VALUE_BASE 3000
131
132#endif // _KBDMOU_
133
134
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette