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