3 Copyright (C) 2011 InvenSense Corporation, All Rights Reserved.
10 #define KEY_CFG_24 (KEY_CFG_25 + 1)
11 #define KEY_CFG_26 (KEY_CFG_24 + 1)
12 #define KEY_CFG_27 (KEY_CFG_26 + 1)
13 #define KEY_CFG_21 (KEY_CFG_27 + 1)
14 #define KEY_CFG_20 (KEY_CFG_21 + 1)
15 #define KEY_CFG_TAP4 (KEY_CFG_20 + 1)
16 #define KEY_CFG_TAP5 (KEY_CFG_TAP4 + 1)
17 #define KEY_CFG_TAP6 (KEY_CFG_TAP5 + 1)
18 #define KEY_CFG_TAP7 (KEY_CFG_TAP6 + 1)
19 #define KEY_CFG_TAP0 (KEY_CFG_TAP7 + 1)
20 #define KEY_CFG_TAP1 (KEY_CFG_TAP0 + 1)
21 #define KEY_CFG_TAP2 (KEY_CFG_TAP1 + 1)
22 #define KEY_CFG_TAP3 (KEY_CFG_TAP2 + 1)
23 #define KEY_CFG_TAP_QUANTIZE (KEY_CFG_TAP3 + 1)
24 #define KEY_CFG_TAP_JERK (KEY_CFG_TAP_QUANTIZE + 1)
25 #define KEY_CFG_DR_INT (KEY_CFG_TAP_JERK + 1)
26 #define KEY_CFG_AUTH (KEY_CFG_DR_INT + 1)
27 #define KEY_CFG_TAP_SAVE_ACCB (KEY_CFG_AUTH + 1)
28 #define KEY_CFG_TAP_CLEAR_STICKY (KEY_CFG_TAP_SAVE_ACCB + 1)
29 #define KEY_CFG_FIFO_ON_EVENT (KEY_CFG_TAP_CLEAR_STICKY + 1)
30 #define KEY_FCFG_ACCEL_INPUT (KEY_CFG_FIFO_ON_EVENT + 1)
31 #define KEY_FCFG_ACCEL_INIT (KEY_FCFG_ACCEL_INPUT + 1)
32 #define KEY_CFG_23 (KEY_FCFG_ACCEL_INIT + 1)
33 #define KEY_FCFG_1 (KEY_CFG_23 + 1)
34 #define KEY_FCFG_3 (KEY_FCFG_1 + 1)
35 #define KEY_FCFG_2 (KEY_FCFG_3 + 1)
36 #define KEY_CFG_3D (KEY_FCFG_2 + 1)
37 #define KEY_CFG_3B (KEY_CFG_3D + 1)
38 #define KEY_CFG_3C (KEY_CFG_3B + 1)
39 #define KEY_FCFG_5 (KEY_CFG_3C + 1)
40 #define KEY_FCFG_4 (KEY_FCFG_5 + 1)
41 #define KEY_FCFG_7 (KEY_FCFG_4 + 1)
42 #define KEY_FCFG_FSCALE (KEY_FCFG_7 + 1)
43 #define KEY_FCFG_AZ (KEY_FCFG_FSCALE + 1)
44 #define KEY_FCFG_6 (KEY_FCFG_AZ + 1)
45 #define KEY_FCFG_LSB4 (KEY_FCFG_6 + 1)
46 #define KEY_CFG_12 (KEY_FCFG_LSB4 + 1)
47 #define KEY_CFG_14 (KEY_CFG_12 + 1)
48 #define KEY_CFG_15 (KEY_CFG_14 + 1)
49 #define KEY_CFG_16 (KEY_CFG_15 + 1)
50 #define KEY_CFG_18 (KEY_CFG_16 + 1)
51 #define KEY_CFG_6 (KEY_CFG_18 + 1)
52 #define KEY_CFG_7 (KEY_CFG_6 + 1)
53 #define KEY_CFG_4 (KEY_CFG_7 + 1)
54 #define KEY_CFG_5 (KEY_CFG_4 + 1)
55 #define KEY_CFG_2 (KEY_CFG_5 + 1)
56 #define KEY_CFG_3 (KEY_CFG_2 + 1)
57 #define KEY_CFG_1 (KEY_CFG_3 + 1)
58 #define KEY_CFG_EXTERNAL (KEY_CFG_1 + 1)
59 #define KEY_CFG_8 (KEY_CFG_EXTERNAL + 1)
60 #define KEY_CFG_9 (KEY_CFG_8 + 1)
61 #define KEY_CFG_ORIENT_3 (KEY_CFG_9 + 1)
62 #define KEY_CFG_ORIENT_2 (KEY_CFG_ORIENT_3 + 1)
63 #define KEY_CFG_ORIENT_1 (KEY_CFG_ORIENT_2 + 1)
64 #define KEY_CFG_GYRO_SOURCE (KEY_CFG_ORIENT_1 + 1)
65 #define KEY_CFG_ORIENT_IRQ_1 (KEY_CFG_GYRO_SOURCE + 1)
66 #define KEY_CFG_ORIENT_IRQ_2 (KEY_CFG_ORIENT_IRQ_1 + 1)
67 #define KEY_CFG_ORIENT_IRQ_3 (KEY_CFG_ORIENT_IRQ_2 + 1)
68 #define KEY_FCFG_MAG_VAL (KEY_CFG_ORIENT_IRQ_3 + 1)
69 #define KEY_FCFG_MAG_MOV (KEY_FCFG_MAG_VAL + 1)
70 #define KEY_CFG_LP_QUAT (KEY_FCFG_MAG_MOV + 1)
73 #define KEY_CFG_ACCEL_FILTER (KEY_CFG_LP_QUAT + 1)
74 #define KEY_CFG_MOTION_BIAS (KEY_CFG_ACCEL_FILTER + 1)
75 #define KEY_TEMPLABEL (KEY_CFG_MOTION_BIAS + 1)
77 #define KEY_D_0_22 (KEY_TEMPLABEL + 1)
78 #define KEY_D_0_24 (KEY_D_0_22 + 1)
79 #define KEY_D_0_36 (KEY_D_0_24 + 1)
80 #define KEY_D_0_52 (KEY_D_0_36 + 1)
81 #define KEY_D_0_96 (KEY_D_0_52 + 1)
82 #define KEY_D_0_104 (KEY_D_0_96 + 1)
83 #define KEY_D_0_108 (KEY_D_0_104 + 1)
84 #define KEY_D_0_163 (KEY_D_0_108 + 1)
85 #define KEY_D_0_188 (KEY_D_0_163 + 1)
86 #define KEY_D_0_192 (KEY_D_0_188 + 1)
87 #define KEY_D_0_224 (KEY_D_0_192 + 1)
88 #define KEY_D_0_228 (KEY_D_0_224 + 1)
89 #define KEY_D_0_232 (KEY_D_0_228 + 1)
90 #define KEY_D_0_236 (KEY_D_0_232 + 1)
92 #define KEY_DMP_PREVPTAT (KEY_D_0_236 + 1)
93 #define KEY_D_1_2 (KEY_DMP_PREVPTAT + 1)
94 #define KEY_D_1_4 (KEY_D_1_2 + 1)
95 #define KEY_D_1_8 (KEY_D_1_4 + 1)
96 #define KEY_D_1_10 (KEY_D_1_8 + 1)
97 #define KEY_D_1_24 (KEY_D_1_10 + 1)
98 #define KEY_D_1_28 (KEY_D_1_24 + 1)
99 #define KEY_D_1_36 (KEY_D_1_28 + 1)
100 #define KEY_D_1_40 (KEY_D_1_36 + 1)
101 #define KEY_D_1_44 (KEY_D_1_40 + 1)
102 #define KEY_D_1_72 (KEY_D_1_44 + 1)
103 #define KEY_D_1_74 (KEY_D_1_72 + 1)
104 #define KEY_D_1_79 (KEY_D_1_74 + 1)
105 #define KEY_D_1_88 (KEY_D_1_79 + 1)
106 #define KEY_D_1_90 (KEY_D_1_88 + 1)
107 #define KEY_D_1_92 (KEY_D_1_90 + 1)
108 #define KEY_D_1_96 (KEY_D_1_92 + 1)
109 #define KEY_D_1_98 (KEY_D_1_96 + 1)
110 #define KEY_D_1_100 (KEY_D_1_98 + 1)
111 #define KEY_D_1_106 (KEY_D_1_100 + 1)
112 #define KEY_D_1_108 (KEY_D_1_106 + 1)
113 #define KEY_D_1_112 (KEY_D_1_108 + 1)
114 #define KEY_D_1_128 (KEY_D_1_112 + 1)
115 #define KEY_D_1_152 (KEY_D_1_128 + 1)
116 #define KEY_D_1_160 (KEY_D_1_152 + 1)
117 #define KEY_D_1_168 (KEY_D_1_160 + 1)
118 #define KEY_D_1_175 (KEY_D_1_168 + 1)
119 #define KEY_D_1_176 (KEY_D_1_175 + 1)
120 #define KEY_D_1_178 (KEY_D_1_176 + 1)
121 #define KEY_D_1_179 (KEY_D_1_178 + 1)
122 #define KEY_D_1_218 (KEY_D_1_179 + 1)
123 #define KEY_D_1_232 (KEY_D_1_218 + 1)
124 #define KEY_D_1_236 (KEY_D_1_232 + 1)
125 #define KEY_D_1_240 (KEY_D_1_236 + 1)
126 #define KEY_D_1_244 (KEY_D_1_240 + 1)
127 #define KEY_D_1_250 (KEY_D_1_244 + 1)
128 #define KEY_D_1_252 (KEY_D_1_250 + 1)
129 #define KEY_D_2_12 (KEY_D_1_252 + 1)
130 #define KEY_D_2_96 (KEY_D_2_12 + 1)
131 #define KEY_D_2_108 (KEY_D_2_96 + 1)
132 #define KEY_D_2_208 (KEY_D_2_108 + 1)
133 #define KEY_FLICK_MSG (KEY_D_2_208 + 1)
134 #define KEY_FLICK_COUNTER (KEY_FLICK_MSG + 1)
135 #define KEY_FLICK_LOWER (KEY_FLICK_COUNTER + 1)
136 #define KEY_CFG_FLICK_IN (KEY_FLICK_LOWER + 1)
137 #define KEY_FLICK_UPPER (KEY_CFG_FLICK_IN + 1)
138 #define KEY_CGNOTICE_INTR (KEY_FLICK_UPPER + 1)
139 #define KEY_D_2_224 (KEY_CGNOTICE_INTR + 1)
140 #define KEY_D_2_244 (KEY_D_2_224 + 1)
141 #define KEY_D_2_248 (KEY_D_2_244 + 1)
142 #define KEY_D_2_252 (KEY_D_2_248 + 1)
144 #define KEY_D_GYRO_BIAS_X (KEY_D_2_252 + 1)
145 #define KEY_D_GYRO_BIAS_Y (KEY_D_GYRO_BIAS_X + 1)
146 #define KEY_D_GYRO_BIAS_Z (KEY_D_GYRO_BIAS_Y + 1)
147 #define KEY_D_ACC_BIAS_X (KEY_D_GYRO_BIAS_Z + 1)
148 #define KEY_D_ACC_BIAS_Y (KEY_D_ACC_BIAS_X + 1)
149 #define KEY_D_ACC_BIAS_Z (KEY_D_ACC_BIAS_Y + 1)
150 #define KEY_D_GYRO_ENABLE (KEY_D_ACC_BIAS_Z + 1)
151 #define KEY_D_ACCEL_ENABLE (KEY_D_GYRO_ENABLE + 1)
152 #define KEY_D_QUAT_ENABLE (KEY_D_ACCEL_ENABLE +1)
153 #define KEY_D_OUTPUT_ENABLE (KEY_D_QUAT_ENABLE + 1)
154 #define KEY_D_CR_TIME_G (KEY_D_OUTPUT_ENABLE + 1)
155 #define KEY_D_CR_TIME_A (KEY_D_CR_TIME_G + 1)
156 #define KEY_D_CR_TIME_Q (KEY_D_CR_TIME_A + 1)
157 #define KEY_D_CS_TAX (KEY_D_CR_TIME_Q + 1)
158 #define KEY_D_CS_TAY (KEY_D_CS_TAX + 1)
159 #define KEY_D_CS_TAZ (KEY_D_CS_TAY + 1)
160 #define KEY_D_CS_TGX (KEY_D_CS_TAZ + 1)
161 #define KEY_D_CS_TGY (KEY_D_CS_TGX + 1)
162 #define KEY_D_CS_TGZ (KEY_D_CS_TGY + 1)
163 #define KEY_D_CS_TQ0 (KEY_D_CS_TGZ + 1)
164 #define KEY_D_CS_TQ1 (KEY_D_CS_TQ0 + 1)
165 #define KEY_D_CS_TQ2 (KEY_D_CS_TQ1 + 1)
166 #define KEY_D_CS_TQ3 (KEY_D_CS_TQ2 + 1)
169 #define KEY_CPASS_BIAS_X (KEY_D_CS_TQ3 + 1)
170 #define KEY_CPASS_BIAS_Y (KEY_CPASS_BIAS_X + 1)
171 #define KEY_CPASS_BIAS_Z (KEY_CPASS_BIAS_Y + 1)
172 #define KEY_CPASS_MTX_00 (KEY_CPASS_BIAS_Z + 1)
173 #define KEY_CPASS_MTX_01 (KEY_CPASS_MTX_00 + 1)
174 #define KEY_CPASS_MTX_02 (KEY_CPASS_MTX_01 + 1)
175 #define KEY_CPASS_MTX_10 (KEY_CPASS_MTX_02 + 1)
176 #define KEY_CPASS_MTX_11 (KEY_CPASS_MTX_10 + 1)
177 #define KEY_CPASS_MTX_12 (KEY_CPASS_MTX_11 + 1)
178 #define KEY_CPASS_MTX_20 (KEY_CPASS_MTX_12 + 1)
179 #define KEY_CPASS_MTX_21 (KEY_CPASS_MTX_20 + 1)
180 #define KEY_CPASS_MTX_22 (KEY_CPASS_MTX_21 + 1)
183 #define KEY_DMP_TAPW_MIN (KEY_CPASS_MTX_22 + 1)
184 #define KEY_DMP_TAP_THR_X (KEY_DMP_TAPW_MIN + 1)
185 #define KEY_DMP_TAP_THR_Y (KEY_DMP_TAP_THR_X + 1)
186 #define KEY_DMP_TAP_THR_Z (KEY_DMP_TAP_THR_Y + 1)
187 #define KEY_DMP_SH_TH_Y (KEY_DMP_TAP_THR_Z + 1)
188 #define KEY_DMP_SH_TH_X (KEY_DMP_SH_TH_Y + 1)
189 #define KEY_DMP_SH_TH_Z (KEY_DMP_SH_TH_X + 1)
190 #define KEY_DMP_ORIENT (KEY_DMP_SH_TH_Z + 1)
191 #define KEY_D_ACT0 (KEY_DMP_ORIENT + 1)
192 #define KEY_D_ACSX (KEY_D_ACT0 + 1)
193 #define KEY_D_ACSY (KEY_D_ACSX + 1)
194 #define KEY_D_ACSZ (KEY_D_ACSY + 1)
196 #define KEY_X_GRT_Y_TMP (KEY_D_ACSZ + 1)
197 #define KEY_SKIP_X_GRT_Y_TMP (KEY_X_GRT_Y_TMP + 1)
198 #define KEY_SKIP_END_COMPARE (KEY_SKIP_X_GRT_Y_TMP + 1)
199 #define KEY_END_COMPARE_Y_X_TMP2 (KEY_SKIP_END_COMPARE + 1)
200 #define KEY_CFG_ANDROID_ORIENT_INT (KEY_END_COMPARE_Y_X_TMP2 + 1)
201 #define KEY_NO_ORIENT_INTERRUPT (KEY_CFG_ANDROID_ORIENT_INT + 1)
202 #define KEY_END_COMPARE_Y_X_TMP (KEY_NO_ORIENT_INTERRUPT + 1)
203 #define KEY_END_ORIENT_1 (KEY_END_COMPARE_Y_X_TMP + 1)
204 #define KEY_END_COMPARE_Y_X (KEY_END_ORIENT_1 + 1)
205 #define KEY_END_ORIENT (KEY_END_COMPARE_Y_X + 1)
206 #define KEY_X_GRT_Y (KEY_END_ORIENT + 1)
207 #define KEY_NOT_TIME_MINUS_1 (KEY_X_GRT_Y + 1)
208 #define KEY_END_COMPARE_Y_X_TMP3 (KEY_NOT_TIME_MINUS_1 + 1)
209 #define KEY_X_GRT_Y_TMP2 (KEY_END_COMPARE_Y_X_TMP3 + 1)
211 /* Authenticate Keys */
212 #define KEY_D_AUTH_OUT (KEY_X_GRT_Y_TMP2 + 1)
213 #define KEY_D_AUTH_IN (KEY_D_AUTH_OUT + 1)
214 #define KEY_D_AUTH_A (KEY_D_AUTH_IN + 1)
215 #define KEY_D_AUTH_B (KEY_D_AUTH_A + 1)
217 /* Pedometer standalone only keys */
218 #define KEY_D_PEDSTD_BP_B (KEY_D_AUTH_B + 1)
219 #define KEY_D_PEDSTD_HP_A (KEY_D_PEDSTD_BP_B + 1)
220 #define KEY_D_PEDSTD_HP_B (KEY_D_PEDSTD_HP_A + 1)
221 #define KEY_D_PEDSTD_BP_A4 (KEY_D_PEDSTD_HP_B + 1)
222 #define KEY_D_PEDSTD_BP_A3 (KEY_D_PEDSTD_BP_A4 + 1)
223 #define KEY_D_PEDSTD_BP_A2 (KEY_D_PEDSTD_BP_A3 + 1)
224 #define KEY_D_PEDSTD_BP_A1 (KEY_D_PEDSTD_BP_A2 + 1)
225 #define KEY_D_PEDSTD_INT_THRSH (KEY_D_PEDSTD_BP_A1 + 1)
226 #define KEY_D_PEDSTD_CLIP (KEY_D_PEDSTD_INT_THRSH + 1)
227 #define KEY_D_PEDSTD_SB (KEY_D_PEDSTD_CLIP + 1)
228 #define KEY_D_PEDSTD_SB_TIME (KEY_D_PEDSTD_SB + 1)
229 #define KEY_D_PEDSTD_PEAKTHRSH (KEY_D_PEDSTD_SB_TIME + 1)
230 #define KEY_D_PEDSTD_TIML (KEY_D_PEDSTD_PEAKTHRSH + 1)
231 #define KEY_D_PEDSTD_TIMH (KEY_D_PEDSTD_TIML + 1)
232 #define KEY_D_PEDSTD_PEAK (KEY_D_PEDSTD_TIMH + 1)
233 #define KEY_D_PEDSTD_TIMECTR (KEY_D_PEDSTD_PEAK + 1)
234 #define KEY_D_PEDSTD_STEPCTR (KEY_D_PEDSTD_TIMECTR + 1)
235 #define KEY_D_PEDSTD_WALKTIME (KEY_D_PEDSTD_STEPCTR + 1)
236 #define KEY_D_PEDSTD_DECI (KEY_D_PEDSTD_WALKTIME + 1)
238 /*Host Based No Motion*/
239 #define KEY_D_HOST_NO_MOT (KEY_D_PEDSTD_DECI + 1)
242 #define KEY_P_EIS_FIFO_FOOTER (KEY_D_HOST_NO_MOT + 1)
243 #define KEY_P_EIS_FIFO_YSHIFT (KEY_P_EIS_FIFO_FOOTER + 1)
244 #define KEY_P_EIS_DATA_RATE (KEY_P_EIS_FIFO_YSHIFT + 1)
245 #define KEY_P_EIS_FIFO_XSHIFT (KEY_P_EIS_DATA_RATE + 1)
246 #define KEY_P_EIS_FIFO_SYNC (KEY_P_EIS_FIFO_XSHIFT + 1)
247 #define KEY_P_EIS_FIFO_ZSHIFT (KEY_P_EIS_FIFO_SYNC + 1)
248 #define KEY_P_EIS_FIFO_READY (KEY_P_EIS_FIFO_ZSHIFT + 1)
249 #define KEY_DMP_FOOTER (KEY_P_EIS_FIFO_READY + 1)
250 #define KEY_DMP_INTX_HC (KEY_DMP_FOOTER + 1)
251 #define KEY_DMP_INTX_PH (KEY_DMP_INTX_HC + 1)
252 #define KEY_DMP_INTX_SH (KEY_DMP_INTX_PH + 1)
253 #define KEY_DMP_AINV_SH (KEY_DMP_INTX_SH + 1)
254 #define KEY_DMP_A_INV_XH (KEY_DMP_AINV_SH + 1)
255 #define KEY_DMP_AINV_PH (KEY_DMP_A_INV_XH + 1)
256 #define KEY_DMP_CTHX_H (KEY_DMP_AINV_PH + 1)
257 #define KEY_DMP_CTHY_H (KEY_DMP_CTHX_H + 1)
258 #define KEY_DMP_CTHZ_H (KEY_DMP_CTHY_H + 1)
259 #define KEY_DMP_NCTHX_H (KEY_DMP_CTHZ_H + 1)
260 #define KEY_DMP_NCTHY_H (KEY_DMP_NCTHX_H + 1)
261 #define KEY_DMP_NCTHZ_H (KEY_DMP_NCTHY_H + 1)
262 #define KEY_DMP_CTSQ_XH (KEY_DMP_NCTHZ_H + 1)
263 #define KEY_DMP_CTSQ_YH (KEY_DMP_CTSQ_XH + 1)
264 #define KEY_DMP_CTSQ_ZH (KEY_DMP_CTSQ_YH + 1)
265 #define KEY_DMP_INTX_H (KEY_DMP_CTSQ_ZH + 1)
266 #define KEY_DMP_INTY_H (KEY_DMP_INTX_H + 1)
267 #define KEY_DMP_INTZ_H (KEY_DMP_INTY_H + 1)
268 //#define KEY_DMP_HPX_H (KEY_DMP_INTZ_H + 1)
269 //#define KEY_DMP_HPY_H (KEY_DMP_HPX_H + 1)
270 //#define KEY_DMP_HPZ_H (KEY_DMP_HPY_H + 1)
273 #define KEY_STREAM_P_GYRO_Z (KEY_DMP_INTZ_H + 1)
274 #define KEY_STREAM_P_GYRO_Y (KEY_STREAM_P_GYRO_Z + 1)
275 #define KEY_STREAM_P_GYRO_X (KEY_STREAM_P_GYRO_Y + 1)
276 #define KEY_STREAM_P_TEMP (KEY_STREAM_P_GYRO_X + 1)
277 #define KEY_STREAM_P_AUX_Y (KEY_STREAM_P_TEMP + 1)
278 #define KEY_STREAM_P_AUX_X (KEY_STREAM_P_AUX_Y + 1)
279 #define KEY_STREAM_P_AUX_Z (KEY_STREAM_P_AUX_X + 1)
280 #define KEY_STREAM_P_ACCEL_Y (KEY_STREAM_P_AUX_Z + 1)
281 #define KEY_STREAM_P_ACCEL_X (KEY_STREAM_P_ACCEL_Y + 1)
282 #define KEY_STREAM_P_FOOTER (KEY_STREAM_P_ACCEL_X + 1)
283 #define KEY_STREAM_P_ACCEL_Z (KEY_STREAM_P_FOOTER + 1)
285 #define NUM_KEYS (KEY_STREAM_P_ACCEL_Z + 1)