blob: 1619e0d826c5f1a8ac94bc1648e3a8e87ab00ac5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef HID_QVR_H_FILE
#define HID_QVR_H_FILE
#define QVR_EXTERNAL_SENSOR_REPORT_ID 0x1
//CMD IDs
#define QVR_CMD_ID_CALIBRATION_DATA_SIZE 20
#define QVR_CMD_ID_CALIBRATION_BLOCK_DATA 21
#define QVR_CMD_ID_START_CALIBRATION_UPDATE 22
#define QVR_CMD_ID_UPDATE_CALIBRATION_BLOCK 23
#define QVR_CMD_ID_FINISH_CALIBRATION_UPDATE 24
#define QVR_CMD_ID_IMU_CONTROL 25
#define QVR_CMD_ID_IMU_CONTROL_FALLBACK 7
#define QVR_HID_REPORT_ID_CAL 2
#define QVR_HID_REQUEST_REPORT_SIZE 64
struct external_imu_format {
u8 reportID;
u8 padding;
u16 version;
u16 numIMUs;
u16 numSamplesPerImuPacket;
u16 totalPayloadSize;
u8 reservedPadding[28];
s16 imuID;
s16 sampleID;
s16 temperature;
u64 gts0;
u32 gNumerator;
u32 gDenominator;
s32 gx0;
s32 gy0;
s32 gz0;
u64 ats0;
u32 aNumerator;
u32 aDenominator;
s32 ax0;
s32 ay0;
s32 az0;
u64 mts0;
u32 mNumerator;
u32 mDenominator;
s32 mx0;
s32 my0;
s32 mz0;
} __packed;
void qvr_clear_def_parmeter(void);
void qvr_init(struct hid_device *hdev);
int qvr_input_init(void);
void qvr_input_remove(void);
#endif
|