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