]>
Commit | Line | Data |
---|---|---|
ed838d0c | 1 | /** @file\r |
2 | \r | |
bb80e3b2 | 3 | The interface of HID data structure.\r |
4 | \r | |
5 | Copyright (c) 2004 - 2008, Intel Corporation\r | |
ed838d0c | 6 | All rights reserved. This program and the accompanying materials\r |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT 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 | |
24 | typedef 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 | |
40 | typedef 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 | |
53 | typedef struct {\r | |
54 | UINT16 Usage[16]; /* usage array */\r | |
55 | UINT16 UsageIndex;\r | |
56 | UINT16 UsageMin;\r | |
57 | } HID_LOCAL;\r | |
58 | \r | |
59 | typedef struct {\r | |
60 | UINT16 Type;\r | |
61 | UINT16 Usage;\r | |
62 | } HID_COLLECTION;\r | |
63 | \r | |
64 | typedef 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 | 84 | EFI_STATUS\r |
85 | ParseMouseReportDescriptor (\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 |