3 Helper routine and corrsponding data struct used by USB Mouse Driver.
5 Copyright (c) 2004 - 2008, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _EFI_USB_MOUSE_H_
17 #define _EFI_USB_MOUSE_H_
22 #include <Protocol/SimplePointer.h>
23 #include <Protocol/UsbIo.h>
24 #include <Protocol/DevicePath.h>
26 #include <Library/ReportStatusCodeLib.h>
27 #include <Library/BaseMemoryLib.h>
28 #include <Library/UefiDriverEntryPoint.h>
29 #include <Library/UefiBootServicesTableLib.h>
30 #include <Library/UefiLib.h>
31 #include <Library/MemoryAllocationLib.h>
32 #include <Library/PcdLib.h>
33 #include <Library/UsbLib.h>
35 #include <IndustryStandard/Usb.h>
38 #define SUBCLASS_BOOT 1
39 #define PROTOCOL_MOUSE 2
41 #define BOOT_PROTOCOL 0
42 #define REPORT_PROTOCOL 1
44 #define USB_MOUSE_DEV_SIGNATURE EFI_SIGNATURE_32 ('u', 'm', 'o', 'u')
47 BOOLEAN ButtonDetected
;
55 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
56 EFI_EVENT DelayedRecoveryEvent
;
57 EFI_USB_IO_PROTOCOL
*UsbIo
;
58 EFI_USB_INTERFACE_DESCRIPTOR
*InterfaceDescriptor
;
59 EFI_USB_ENDPOINT_DESCRIPTOR
*IntEndpointDescriptor
;
60 UINT8 NumberOfButtons
;
65 EFI_SIMPLE_POINTER_PROTOCOL SimplePointerProtocol
;
66 EFI_SIMPLE_POINTER_STATE State
;
67 EFI_SIMPLE_POINTER_MODE Mode
;
69 PRIVATE_DATA PrivateData
;
70 EFI_UNICODE_STRING_TABLE
*ControllerNameTable
;
73 #define USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL(a) \
74 CR(a, USB_MOUSE_DEV, SimplePointerProtocol, USB_MOUSE_DEV_SIGNATURE)
78 Timer handler for Delayed Recovery timer.
80 @param Event The Delayed Recovery event.
81 @param Context Points to the USB_KB_DEV instance.
87 USBMouseRecoveryHandler (
95 extern EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding
;
96 extern EFI_COMPONENT_NAME_PROTOCOL gUsbMouseComponentName
;
97 extern EFI_COMPONENT_NAME2_PROTOCOL gUsbMouseComponentName2
;
98 extern EFI_GUID gEfiUsbMouseDriverGuid
;
102 Report Status Code in Usb Bot Driver.
104 @param DevicePath Use this to get Device Path
105 @param CodeType Status Code Type
106 @param CodeValue Status Code Value
112 MouseReportStatusCode (
113 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
114 IN EFI_STATUS_CODE_TYPE CodeType
,
115 IN EFI_STATUS_CODE_VALUE Value