rbandi | 127f7ad | 2018-09-06 16:28:40 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 and |
| 6 | * only version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | */ |
| 14 | |
| 15 | #ifndef HID_QVR_H_FILE |
| 16 | #define HID_QVR_H_FILE |
| 17 | |
rbandi | 127f7ad | 2018-09-06 16:28:40 -0700 | [diff] [blame] | 18 | #define QVR_EXTERNAL_SENSOR_REPORT_ID 0x1 |
| 19 | |
| 20 | struct external_imu_format { |
| 21 | s16 temp0; |
| 22 | s16 temp1; |
| 23 | s16 temp2; |
| 24 | s16 temp3; |
| 25 | u64 gts0; |
| 26 | u64 gts1; |
| 27 | u64 gts2; |
| 28 | u64 gts3; |
| 29 | s16 gx0; |
| 30 | s16 gx1; |
| 31 | s16 gx2; |
| 32 | s16 gx3; |
| 33 | s16 gx4; |
| 34 | s16 gx5; |
| 35 | s16 gx6; |
| 36 | s16 gx7; |
| 37 | s16 gx8; |
| 38 | s16 gx9; |
| 39 | s16 gx10; |
| 40 | s16 gx11; |
| 41 | s16 gx12; |
| 42 | s16 gx13; |
| 43 | s16 gx14; |
| 44 | s16 gx15; |
| 45 | s16 gx16; |
| 46 | s16 gx17; |
| 47 | s16 gx18; |
| 48 | s16 gx19; |
| 49 | s16 gx20; |
| 50 | s16 gx21; |
| 51 | s16 gx22; |
| 52 | s16 gx23; |
| 53 | s16 gx24; |
| 54 | s16 gx25; |
| 55 | s16 gx26; |
| 56 | s16 gx27; |
| 57 | s16 gx28; |
| 58 | s16 gx29; |
| 59 | s16 gx30; |
| 60 | s16 gx31; |
| 61 | s16 gy0; |
| 62 | s16 gy1; |
| 63 | s16 gy2; |
| 64 | s16 gy3; |
| 65 | s16 gy4; |
| 66 | s16 gy5; |
| 67 | s16 gy6; |
| 68 | s16 gy7; |
| 69 | s16 gy8; |
| 70 | s16 gy9; |
| 71 | s16 gy10; |
| 72 | s16 gy11; |
| 73 | s16 gy12; |
| 74 | s16 gy13; |
| 75 | s16 gy14; |
| 76 | s16 gy15; |
| 77 | s16 gy16; |
| 78 | s16 gy17; |
| 79 | s16 gy18; |
| 80 | s16 gy19; |
| 81 | s16 gy20; |
| 82 | s16 gy21; |
| 83 | s16 gy22; |
| 84 | s16 gy23; |
| 85 | s16 gy24; |
| 86 | s16 gy25; |
| 87 | s16 gy26; |
| 88 | s16 gy27; |
| 89 | s16 gy28; |
| 90 | s16 gy29; |
| 91 | s16 gy30; |
| 92 | s16 gy31; |
| 93 | s16 gz0; |
| 94 | s16 gz1; |
| 95 | s16 gz2; |
| 96 | s16 gz3; |
| 97 | s16 gz4; |
| 98 | s16 gz5; |
| 99 | s16 gz6; |
| 100 | s16 gz7; |
| 101 | s16 gz8; |
| 102 | s16 gz9; |
| 103 | s16 gz10; |
| 104 | s16 gz11; |
| 105 | s16 gz12; |
| 106 | s16 gz13; |
| 107 | s16 gz14; |
| 108 | s16 gz15; |
| 109 | s16 gz16; |
| 110 | s16 gz17; |
| 111 | s16 gz18; |
| 112 | s16 gz19; |
| 113 | s16 gz20; |
| 114 | s16 gz21; |
| 115 | s16 gz22; |
| 116 | s16 gz23; |
| 117 | s16 gz24; |
| 118 | s16 gz25; |
| 119 | s16 gz26; |
| 120 | s16 gz27; |
| 121 | s16 gz28; |
| 122 | s16 gz29; |
| 123 | s16 gz30; |
| 124 | s16 gz31; |
| 125 | u64 ats0; |
| 126 | u64 ats1; |
| 127 | u64 ats2; |
| 128 | u64 ats3; |
| 129 | s32 ax0; |
| 130 | s32 ax1; |
| 131 | s32 ax2; |
| 132 | s32 ax3; |
| 133 | s32 ay0; |
| 134 | s32 ay1; |
| 135 | s32 ay2; |
| 136 | s32 ay3; |
| 137 | s32 az0; |
| 138 | s32 az1; |
| 139 | s32 az2; |
| 140 | s32 az3; |
| 141 | u64 mts0; |
| 142 | u64 mts1; |
| 143 | u64 mts2; |
| 144 | u64 mts3; |
| 145 | s16 mx0; |
| 146 | s16 mx1; |
| 147 | s16 mx2; |
| 148 | s16 mx3; |
| 149 | s16 my0; |
| 150 | s16 my1; |
| 151 | s16 my2; |
| 152 | s16 my3; |
| 153 | s16 mz0; |
| 154 | s16 mz1; |
| 155 | s16 mz2; |
| 156 | s16 mz3;//368 bytes |
| 157 | }; |
| 158 | |
| 159 | int qvr_send_package_wrap(u8 *message, int msize, struct hid_device *hid); |
| 160 | void qvr_clear_def_parmeter(void); |
| 161 | void qvr_init(struct hid_device *hdev); |
| 162 | int qvr_input_init(void); |
| 163 | void qvr_input_remove(void); |
| 164 | |
| 165 | #endif |