Lines Matching +full:0 +full:x3f
44 … grip_btn_gpp[] = { BTN_START, BTN_SELECT, BTN_TR2, BTN_Y, 0, BTN_TL2, BTN_A, BTN_B, BTN_X, 0, BTN…
58 static char grip_anx[] = { 0, 0, 3, 5, 5 };
59 static char grip_cen[] = { 0, 0, 2, 2, 4 };
74 data[0] = 0; in grip_gpp_read_packet()
76 i = 0; in grip_gpp_read_packet()
86 data[0] |= (v >> 1) << i++; in grip_gpp_read_packet()
89 } while (i < GRIP_LENGTH_GPP && t > 0); in grip_gpp_read_packet()
95 for (i = 0; i < GRIP_LENGTH_GPP && (data[0] & 0xfe4210) ^ 0x7c0000; i++) in grip_gpp_read_packet()
96 data[0] = data[0] >> 1 | (data[0] & 1) << (GRIP_LENGTH_GPP - 1); in grip_gpp_read_packet()
115 data[0] = data[1] = data[2] = data[3] = 0; in grip_xt_read_packet()
116 status = buf = i = j = 0; in grip_xt_read_packet()
138 if (!((crc ^ (0x25cb9e70 >> ((crc >> 2) & 0x1c))) & 0xf)) { in grip_xt_read_packet()
145 buf = 0; in grip_xt_read_packet()
146 i = 0; in grip_xt_read_packet()
152 } while (status != 0xf && i < GRIP_MAX_BITS_XT && j < GRIP_MAX_CHUNKS_XT && t > 0); in grip_xt_read_packet()
156 return -(status != 0xf); in grip_xt_read_packet()
170 for (i = 0; i < 2; i++) { in grip_poll()
190 for (j = 0; j < 12; j++) in grip_poll()
203 input_report_abs(dev, ABS_X, (data[0] >> 2) & 0x3f); in grip_poll()
204 input_report_abs(dev, ABS_Y, 63 - ((data[0] >> 8) & 0x3f)); in grip_poll()
205 input_report_abs(dev, ABS_THROTTLE, (data[2] >> 8) & 0x3f); in grip_poll()
210 for (j = 0; j < 5; j++) in grip_poll()
222 input_report_abs(dev, ABS_X, (data[0] >> 2) & 0x3f); in grip_poll()
223 input_report_abs(dev, ABS_Y, 63 - ((data[0] >> 8) & 0x3f)); in grip_poll()
224 input_report_abs(dev, ABS_BRAKE, (data[1] >> 2) & 0x3f); in grip_poll()
225 input_report_abs(dev, ABS_GAS, (data[1] >> 8) & 0x3f); in grip_poll()
226 input_report_abs(dev, ABS_THROTTLE, (data[2] >> 8) & 0x3f); in grip_poll()
233 for (j = 0; j < 11; j++) in grip_poll()
244 input_report_abs(dev, ABS_X, (data[0] >> 2) & 0x3f); in grip_poll()
245 input_report_abs(dev, ABS_Y, (data[0] >> 8) & 0x3f); in grip_poll()
246 input_report_abs(dev, ABS_RX, (data[1] >> 2) & 0x3f); in grip_poll()
247 input_report_abs(dev, ABS_RY, (data[1] >> 8) & 0x3f); in grip_poll()
248 input_report_abs(dev, ABS_THROTTLE, (data[2] >> 8) & 0x3f); in grip_poll()
253 for (j = 0; j < 9; j++) in grip_poll()
269 return 0; in grip_open()
299 for (i = 0; i < 2; i++) { in grip_connect()
309 if (!(data[2] & 0xf0)) { in grip_connect()
318 if (!grip->mode[0] && !grip->mode[1]) { in grip_connect()
326 for (i = 0; i < 2; i++) { in grip_connect()
344 input_dev->id.version = 0x0100; in grip_connect()
352 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in grip_connect()
354 for (j = 0; (t = grip_abs[grip->mode[i]][j]) >= 0; j++) { in grip_connect()
359 input_set_abs_params(input_dev, t, 3, 57, 1, 0); in grip_connect()
361 input_set_abs_params(input_dev, t, -1, 1, 0, 0); in grip_connect()
364 for (j = 0; (t = grip_btn[grip->mode[i]][j]) >= 0; j++) in grip_connect()
365 if (t > 0) in grip_connect()
373 return 0; in grip_connect()
376 fail3: while (--i >= 0) in grip_connect()
390 for (i = 0; i < 2; i++) in grip_disconnect()