]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Usb/UsbMouseDxe/mousehid.h
1. Import UsbKbDxe and UsbMouseDxe into MdeModulePkg
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMouseDxe / mousehid.h
1 /** @file
2
3 Copyright (c) 2004, 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 MouseHid.h
15
16 Abstract:
17
18
19 **/
20
21 #ifndef __MOUSE_HID_H
22 #define __MOUSE_HID_H
23
24 #include "usbmouse.h"
25
26 //
27 // HID Item general structure
28 //
29 typedef struct _hid_item {
30 UINT16 Format;
31 UINT8 Size;
32 UINT8 Type;
33 UINT8 Tag;
34 union {
35 UINT8 U8;
36 UINT16 U16;
37 UINT32 U32;
38 INT8 I8;
39 INT16 I16;
40 INT32 I32;
41 UINT8 *LongData;
42 } Data;
43 } HID_ITEM;
44
45 typedef struct {
46 UINT16 UsagePage;
47 INT32 LogicMin;
48 INT32 LogicMax;
49 INT32 PhysicalMin;
50 INT32 PhysicalMax;
51 UINT16 UnitExp;
52 UINT16 UINT;
53 UINT16 ReportId;
54 UINT16 ReportSize;
55 UINT16 ReportCount;
56 } HID_GLOBAL;
57
58 typedef struct {
59 UINT16 Usage[16]; /* usage array */
60 UINT16 UsageIndex;
61 UINT16 UsageMin;
62 } HID_LOCAL;
63
64 typedef struct {
65 UINT16 Type;
66 UINT16 Usage;
67 } HID_COLLECTION;
68
69 typedef struct {
70 HID_GLOBAL Global;
71 HID_GLOBAL GlobalStack[8];
72 UINT32 GlobalStackPtr;
73 HID_LOCAL Local;
74 HID_COLLECTION CollectionStack[8];
75 UINT32 CollectionStackPtr;
76 } HID_PARSER;
77
78 EFI_STATUS
79 ParseMouseReportDescriptor (
80 IN USB_MOUSE_DEV *UsbMouse,
81 IN UINT8 *ReportDescriptor,
82 IN UINTN ReportSize
83 );
84
85 #endif