]>
Commit | Line | Data |
---|---|---|
09f72ae8 | 1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2004, Intel Corporation\r | |
4 | All rights reserved. This program and the accompanying materials\r | |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | MouseHid.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | \r | |
19 | **/\r | |
20 | \r | |
21 | #ifndef __MOUSE_HID_H\r | |
22 | #define __MOUSE_HID_H\r | |
23 | \r | |
24 | #include "UsbMouseAbsolutePointer.h"\r | |
25 | \r | |
26 | //\r | |
27 | // HID Item general structure\r | |
28 | //\r | |
29 | typedef struct _hid_item {\r | |
30 | UINT16 Format;\r | |
31 | UINT8 Size;\r | |
32 | UINT8 Type;\r | |
33 | UINT8 Tag;\r | |
34 | union {\r | |
35 | UINT8 U8;\r | |
36 | UINT16 U16;\r | |
37 | UINT32 U32;\r | |
38 | INT8 I8;\r | |
39 | INT16 I16;\r | |
40 | INT32 I32;\r | |
41 | UINT8 *LongData;\r | |
42 | } Data;\r | |
43 | } HID_ITEM;\r | |
44 | \r | |
45 | typedef struct {\r | |
46 | UINT16 UsagePage;\r | |
47 | INT32 LogicMin;\r | |
48 | INT32 LogicMax;\r | |
49 | INT32 PhysicalMin;\r | |
50 | INT32 PhysicalMax;\r | |
51 | UINT16 UnitExp;\r | |
52 | UINT16 UINT;\r | |
53 | UINT16 ReportId;\r | |
54 | UINT16 ReportSize;\r | |
55 | UINT16 ReportCount;\r | |
56 | } HID_GLOBAL;\r | |
57 | \r | |
58 | typedef struct {\r | |
59 | UINT16 Usage[16]; /* usage array */\r | |
60 | UINT16 UsageIndex;\r | |
61 | UINT16 UsageMin;\r | |
62 | } HID_LOCAL;\r | |
63 | \r | |
64 | typedef struct {\r | |
65 | UINT16 Type;\r | |
66 | UINT16 Usage;\r | |
67 | } HID_COLLECTION;\r | |
68 | \r | |
69 | typedef struct {\r | |
70 | HID_GLOBAL Global;\r | |
71 | HID_GLOBAL GlobalStack[8];\r | |
72 | UINT32 GlobalStackPtr;\r | |
73 | HID_LOCAL Local;\r | |
74 | HID_COLLECTION CollectionStack[8];\r | |
75 | UINT32 CollectionStackPtr;\r | |
76 | } HID_PARSER;\r | |
77 | \r | |
78 | EFI_STATUS\r | |
79 | ParseMouseReportDescriptor (\r | |
80 | IN USB_MOUSE_ABSOLUTE_POINTER_DEV *UsbMouseAbsolutePointer,\r | |
81 | IN UINT8 *ReportDescriptor,\r | |
82 | IN UINTN ReportSize\r | |
83 | );\r | |
84 | \r | |
85 | #endif\r |