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