4 * Structures and definitions for Keyboard/Mouse class and port drivers.
6 * This file is part of the w32api package.
9 * Created by Filip Navara <xnavara@volny.cz>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26 #include <ddk/ntddkbd.h>
27 #include <ddk/ntddmou.h>
29 #define DD_KEYBOARD_PORT_DEVICE_NAME "\\Device\\KeyboardPort"
30 #define DD_KEYBOARD_PORT_DEVICE_NAME_U L"\\Device\\KeyboardPort"
31 #define DD_KEYBOARD_PORT_BASE_NAME_U L"KeyboardPort"
32 #define DD_POINTER_PORT_DEVICE_NAME "\\Device\\PointerPort"
33 #define DD_POINTER_PORT_DEVICE_NAME_U L"\\Device\\PointerPort"
34 #define DD_POINTER_PORT_BASE_NAME_U L"PointerPort"
36 #define DD_KEYBOARD_CLASS_BASE_NAME_U L"KeyboardClass"
37 #define DD_POINTER_CLASS_BASE_NAME_U L"PointerClass"
39 #define DD_KEYBOARD_RESOURCE_CLASS_NAME_U L"Keyboard"
40 #define DD_POINTER_RESOURCE_CLASS_NAME_U L"Pointer"
41 #define DD_KEYBOARD_MOUSE_COMBO_RESOURCE_CLASS_NAME_U L"Keyboard/Pointer"
43 #define POINTER_PORTS_MAXIMUM 8
44 #define KEYBOARD_PORTS_MAXIMUM 8
46 #define KBDMOU_COULD_NOT_SEND_COMMAND 0x0000
47 #define KBDMOU_COULD_NOT_SEND_PARAM 0x0001
48 #define KBDMOU_NO_RESPONSE 0x0002
49 #define KBDMOU_INCORRECT_RESPONSE 0x0004
51 #define I8042_ERROR_VALUE_BASE 1000
52 #define INPORT_ERROR_VALUE_BASE 2000
53 #define SERIAL_MOUSE_ERROR_VALUE_BASE 3000
55 #define IOCTL_INTERNAL_KEYBOARD_CONNECT \
56 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
58 #define IOCTL_INTERNAL_KEYBOARD_DISCONNECT \
59 CTL_CODE(FILE_DEVICE_KEYBOARD,0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
61 #define IOCTL_INTERNAL_KEYBOARD_ENABLE \
62 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
64 #define IOCTL_INTERNAL_KEYBOARD_DISABLE \
65 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
67 #define IOCTL_INTERNAL_MOUSE_CONNECT \
68 CTL_CODE(FILE_DEVICE_MOUSE, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
70 #define IOCTL_INTERNAL_MOUSE_DISCONNECT \
71 CTL_CODE(FILE_DEVICE_MOUSE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
73 #define IOCTL_INTERNAL_MOUSE_ENABLE \
74 CTL_CODE(FILE_DEVICE_MOUSE, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
76 #define IOCTL_INTERNAL_MOUSE_DISABLE \
77 CTL_CODE(FILE_DEVICE_MOUSE, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
79 typedef struct _CONNECT_DATA
{
80 PDEVICE_OBJECT ClassDeviceObject
;
82 } CONNECT_DATA
, *PCONNECT_DATA
;
85 (STDAPICALLTYPE
*PSERVICE_CALLBACK_ROUTINE
)(
86 /*IN*/ PVOID NormalContext
,
87 /*IN*/ PVOID SystemArgument1
,
88 /*IN*/ PVOID SystemArgument2
,
89 /*IN OUT*/ PVOID SystemArgument3
);
91 #endif /* __KBDMOU_H */