2 * Copyright (c) 2009, Microsoft Corporation.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
18 * Hank Janssen <hjanssen@microsoft.com>
20 #ifndef _VMBUS_HID_PROTOCOL_
21 #define _VMBUS_HID_PROTOCOL_
23 /* The maximum size of a synthetic input message. */
24 #define SYNTHHID_MAX_INPUT_REPORT_SIZE 16
30 * Beta, RC < 2008/1/22 1,0
33 #define SYNTHHID_INPUT_VERSION_MAJOR 2
34 #define SYNTHHID_INPUT_VERSION_MINOR 0
35 #define SYNTHHID_INPUT_VERSION_DWORD (SYNTHHID_INPUT_VERSION_MINOR | \
36 (SYNTHHID_INPUT_VERSION_MAJOR << 16))
42 * Message types in the synthetic input protocol
44 enum synthhid_msg_type
46 SynthHidProtocolRequest
,
47 SynthHidProtocolResponse
,
48 SynthHidInitialDeviceInfo
,
49 SynthHidInitialDeviceInfoAck
,
56 * Basic message structures.
60 enum synthhid_msg_type Type
; /* Type of the enclosed message */
61 u32 Size
; /* Size of the enclosed message
62 * (size of the data payload)
64 } SYNTHHID_MESSAGE_HEADER
, *PSYNTHHID_MESSAGE_HEADER
;
68 SYNTHHID_MESSAGE_HEADER Header
;
69 char Data
[1]; /* Enclosed message */
70 } SYNTHHID_MESSAGE
, *PSYNTHHID_MESSAGE
;
80 } SYNTHHID_VERSION
, *PSYNTHHID_VERSION
;
87 SYNTHHID_MESSAGE_HEADER Header
;
88 SYNTHHID_VERSION VersionRequested
;
89 } SYNTHHID_PROTOCOL_REQUEST
, *PSYNTHHID_PROTOCOL_REQUEST
;
93 SYNTHHID_MESSAGE_HEADER Header
;
94 SYNTHHID_VERSION VersionRequested
;
95 unsigned char Approved
;
96 } SYNTHHID_PROTOCOL_RESPONSE
, *PSYNTHHID_PROTOCOL_RESPONSE
;
100 SYNTHHID_MESSAGE_HEADER Header
;
101 struct input_dev_info HidDeviceAttributes
;
102 unsigned char HidDescriptorInformation
[1];
103 } SYNTHHID_DEVICE_INFO
, *PSYNTHHID_DEVICE_INFO
;
107 SYNTHHID_MESSAGE_HEADER Header
;
108 unsigned char Reserved
;
109 } SYNTHHID_DEVICE_INFO_ACK
, *PSYNTHHID_DEVICE_INFO_ACK
;
113 SYNTHHID_MESSAGE_HEADER Header
;
114 char ReportBuffer
[1];
115 } SYNTHHID_INPUT_REPORT
, *PSYNTHHID_INPUT_REPORT
;
119 #endif /* _VMBUS_HID_PROTOCOL_ */