]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.h
Check Library usage and fix some typo.
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMouseDxe / MouseHid.h
CommitLineData
ed838d0c 1/** @file\r
2\r
bb80e3b2 3 The interface of HID data structure.\r
4\r
5Copyright (c) 2004 - 2008, Intel Corporation\r
ed838d0c 6All rights reserved. This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
ed838d0c 14**/\r
15\r
bb80e3b2 16#ifndef _EFI_MOUSE_HID_H_\r
17#define _EFI_MOUSE_HID_H_\r
ed838d0c 18\r
0c36e4c1 19#include "UsbMouse.h"\r
ed838d0c 20\r
21//\r
22// HID Item general structure\r
23//\r
24typedef struct _hid_item {\r
25 UINT16 Format;\r
26 UINT8 Size;\r
27 UINT8 Type;\r
28 UINT8 Tag;\r
29 union {\r
30 UINT8 U8;\r
31 UINT16 U16;\r
32 UINT32 U32;\r
33 INT8 I8;\r
34 INT16 I16;\r
35 INT32 I32;\r
36 UINT8 *LongData;\r
37 } Data;\r
38} HID_ITEM;\r
39\r
40typedef struct {\r
41 UINT16 UsagePage;\r
42 INT32 LogicMin;\r
43 INT32 LogicMax;\r
44 INT32 PhysicalMin;\r
45 INT32 PhysicalMax;\r
46 UINT16 UnitExp;\r
47 UINT16 UINT;\r
48 UINT16 ReportId;\r
49 UINT16 ReportSize;\r
50 UINT16 ReportCount;\r
51} HID_GLOBAL;\r
52\r
53typedef struct {\r
54 UINT16 Usage[16]; /* usage array */\r
55 UINT16 UsageIndex;\r
56 UINT16 UsageMin;\r
57} HID_LOCAL;\r
58\r
59typedef struct {\r
60 UINT16 Type;\r
61 UINT16 Usage;\r
62} HID_COLLECTION;\r
63\r
64typedef struct {\r
65 HID_GLOBAL Global;\r
66 HID_GLOBAL GlobalStack[8];\r
67 UINT32 GlobalStackPtr;\r
68 HID_LOCAL Local;\r
69 HID_COLLECTION CollectionStack[8];\r
70 UINT32 CollectionStackPtr;\r
71} HID_PARSER;\r
72\r
bb80e3b2 73/**\r
74 Parse Mouse Report Descriptor.\r
75\r
76 @param UsbMouse The instance of USB_MOUSE_DEV\r
77 @param ReportDescriptor Report descriptor to parse\r
78 @param ReportSize Report descriptor size\r
79\r
80 @retval EFI_DEVICE_ERROR Report descriptor error\r
81 @retval EFI_SUCCESS Parse descriptor success\r
82\r
83**/\r
ed838d0c 84EFI_STATUS\r
85ParseMouseReportDescriptor (\r
86 IN USB_MOUSE_DEV *UsbMouse,\r
87 IN UINT8 *ReportDescriptor,\r
88 IN UINTN ReportSize\r
89 );\r
90\r
91#endif\r