]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.h
PcdIoBlockBaseAddressForIpf is required by IPF platform so need add it back
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMouseDxe / usbmouse.h
CommitLineData
ed838d0c 1/** @file\r
2\r
3Copyright (c) 2004 - 2007, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12 Module Name:\r
13\r
14 UsbMouse.h\r
15\r
16 Abstract:\r
17\r
18\r
19**/\r
20\r
21#ifndef _USB_MOUSE_H\r
22#define _USB_MOUSE_H\r
23\r
24//\r
25// The package level header files this module uses\r
26//\r
27#include <PiDxe.h>\r
28//\r
29// The protocols, PPI and GUID defintions for this module\r
30//\r
31#include <Protocol/SimplePointer.h>\r
32#include <Protocol/UsbIo.h>\r
33#include <Protocol/DevicePath.h>\r
34//\r
35// The Library classes this module consumes\r
36//\r
37#include <Library/ReportStatusCodeLib.h>\r
38#include <Library/BaseMemoryLib.h>\r
39#include <Library/UefiDriverEntryPoint.h>\r
40#include <Library/UefiBootServicesTableLib.h>\r
41#include <Library/UefiLib.h>\r
42#include <Library/MemoryAllocationLib.h>\r
43#include <Library/PcdLib.h>\r
44#include <Library/UsbLib.h>\r
45\r
46#include <IndustryStandard/Usb.h>\r
47\r
48#define CLASS_HID 3\r
49#define SUBCLASS_BOOT 1\r
50#define PROTOCOL_MOUSE 2\r
51\r
52#define BOOT_PROTOCOL 0\r
53#define REPORT_PROTOCOL 1\r
54\r
55#define USB_MOUSE_DEV_SIGNATURE EFI_SIGNATURE_32 ('u', 'm', 'o', 'u')\r
56\r
57typedef struct {\r
58 BOOLEAN ButtonDetected;\r
59 UINT8 ButtonMinIndex;\r
60 UINT8 ButtonMaxIndex;\r
61 UINT8 Reserved;\r
62} PRIVATE_DATA;\r
63\r
64typedef struct {\r
65 UINTN Signature;\r
66 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
67 EFI_EVENT DelayedRecoveryEvent;\r
68 EFI_USB_IO_PROTOCOL *UsbIo;\r
69 EFI_USB_INTERFACE_DESCRIPTOR *InterfaceDescriptor;\r
70 EFI_USB_ENDPOINT_DESCRIPTOR *IntEndpointDescriptor;\r
71 UINT8 NumberOfButtons;\r
72 INT32 XLogicMax;\r
73 INT32 XLogicMin;\r
74 INT32 YLogicMax;\r
75 INT32 YLogicMin;\r
76 EFI_SIMPLE_POINTER_PROTOCOL SimplePointerProtocol;\r
77 EFI_SIMPLE_POINTER_STATE State;\r
78 EFI_SIMPLE_POINTER_MODE Mode;\r
79 BOOLEAN StateChanged;\r
80 PRIVATE_DATA PrivateData;\r
81 EFI_UNICODE_STRING_TABLE *ControllerNameTable;\r
82} USB_MOUSE_DEV;\r
83\r
84#define USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL(a) \\r
85 CR(a, USB_MOUSE_DEV, SimplePointerProtocol, USB_MOUSE_DEV_SIGNATURE)\r
86\r
87VOID\r
88EFIAPI\r
89USBMouseRecoveryHandler (\r
90 IN EFI_EVENT Event,\r
91 IN VOID *Context\r
92 );\r
93\r
94//\r
95// Global Variables\r
96//\r
97extern EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding;\r
98extern EFI_COMPONENT_NAME_PROTOCOL gUsbMouseComponentName;\r
99extern EFI_GUID gEfiUsbMouseDriverGuid;\r
100\r
101VOID\r
102MouseReportStatusCode (\r
103 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
104 IN EFI_STATUS_CODE_TYPE CodeType,\r
105 IN EFI_STATUS_CODE_VALUE Value\r
106 );\r
107\r
108#endif\r