Lines Matching full:payload
1250 static void handler_keys(struct wiimote_data *wdata, const __u8 *payload) in handler_keys() argument
1257 ops->in_keys(wdata, payload); in handler_keys()
1265 ops->in_keys(wdata, payload); in handler_keys()
1271 static void handler_accel(struct wiimote_data *wdata, const __u8 *payload) in handler_accel() argument
1278 ops->in_accel(wdata, payload); in handler_accel()
1286 ops->in_accel(wdata, payload); in handler_accel()
1304 static void handler_ext(struct wiimote_data *wdata, const __u8 *payload, in handler_ext() argument
1319 if (len < 6 || !memcmp(payload, invalid, len)) in handler_ext()
1325 if (payload[5] & 0x01) in handler_ext()
1328 if (payload[4] & 0x01) { in handler_ext()
1344 is_mp = payload[5] & 0x02; in handler_ext()
1356 ops->in_mp(wdata, payload); in handler_ext()
1359 ops->in_ext(wdata, payload); in handler_ext()
1366 ops->in_mp(wdata, payload); in handler_ext()
1369 ops->in_ext(wdata, payload); in handler_ext()
1378 ops->in_mp(wdata, payload); in handler_ext()
1381 ops->in_ext(wdata, payload); in handler_ext()
1392 static void handler_ir(struct wiimote_data *wdata, const __u8 *payload, in handler_ir() argument
1400 ops->in_ir(wdata, payload, packed, id); in handler_ir()
1408 ops->in_ir(wdata, payload, packed, id); in handler_ir()
1416 const __u8 *payload) in handler_status_K() argument
1418 handler_keys(wdata, payload); in handler_status_K()
1425 static void handler_status(struct wiimote_data *wdata, const __u8 *payload) in handler_status() argument
1427 handler_status_K(wdata, payload); in handler_status()
1430 if (payload[2] & 0x02) { in handler_status()
1447 wdata->state.cmd_battery = payload[5]; in handler_status()
1453 static void handler_generic_K(struct wiimote_data *wdata, const __u8 *payload) in handler_generic_K() argument
1455 handler_keys(wdata, payload); in handler_generic_K()
1458 static void handler_data(struct wiimote_data *wdata, const __u8 *payload) in handler_data() argument
1460 __u16 offset = payload[3] << 8 | payload[4]; in handler_data()
1461 __u8 size = (payload[2] >> 4) + 1; in handler_data()
1462 __u8 err = payload[2] & 0x0f; in handler_data()
1464 handler_keys(wdata, payload); in handler_data()
1474 memcpy(wdata->state.cmd_read_buf, &payload[5], size); in handler_data()
1479 static void handler_return(struct wiimote_data *wdata, const __u8 *payload) in handler_return() argument
1481 __u8 err = payload[3]; in handler_return()
1482 __u8 cmd = payload[2]; in handler_return()
1484 handler_keys(wdata, payload); in handler_return()
1495 static void handler_drm_KA(struct wiimote_data *wdata, const __u8 *payload) in handler_drm_KA() argument
1497 handler_keys(wdata, payload); in handler_drm_KA()
1498 handler_accel(wdata, payload); in handler_drm_KA()
1501 static void handler_drm_KE(struct wiimote_data *wdata, const __u8 *payload) in handler_drm_KE() argument
1503 handler_keys(wdata, payload); in handler_drm_KE()
1504 handler_ext(wdata, &payload[2], 8); in handler_drm_KE()
1507 static void handler_drm_KAI(struct wiimote_data *wdata, const __u8 *payload) in handler_drm_KAI() argument
1509 handler_keys(wdata, payload); in handler_drm_KAI()
1510 handler_accel(wdata, payload); in handler_drm_KAI()
1511 ir_to_input0(wdata, &payload[5], false); in handler_drm_KAI()
1512 ir_to_input1(wdata, &payload[8], false); in handler_drm_KAI()
1513 ir_to_input2(wdata, &payload[11], false); in handler_drm_KAI()
1514 ir_to_input3(wdata, &payload[14], false); in handler_drm_KAI()
1517 static void handler_drm_KEE(struct wiimote_data *wdata, const __u8 *payload) in handler_drm_KEE() argument
1519 handler_keys(wdata, payload); in handler_drm_KEE()
1520 handler_ext(wdata, &payload[2], 19); in handler_drm_KEE()
1523 static void handler_drm_KIE(struct wiimote_data *wdata, const __u8 *payload) in handler_drm_KIE() argument
1525 handler_keys(wdata, payload); in handler_drm_KIE()
1526 ir_to_input0(wdata, &payload[2], false); in handler_drm_KIE()
1527 ir_to_input1(wdata, &payload[4], true); in handler_drm_KIE()
1528 ir_to_input2(wdata, &payload[7], false); in handler_drm_KIE()
1529 ir_to_input3(wdata, &payload[9], true); in handler_drm_KIE()
1530 handler_ext(wdata, &payload[12], 9); in handler_drm_KIE()
1533 static void handler_drm_KAE(struct wiimote_data *wdata, const __u8 *payload) in handler_drm_KAE() argument
1535 handler_keys(wdata, payload); in handler_drm_KAE()
1536 handler_accel(wdata, payload); in handler_drm_KAE()
1537 handler_ext(wdata, &payload[5], 16); in handler_drm_KAE()
1540 static void handler_drm_KAIE(struct wiimote_data *wdata, const __u8 *payload) in handler_drm_KAIE() argument
1542 handler_keys(wdata, payload); in handler_drm_KAIE()
1543 handler_accel(wdata, payload); in handler_drm_KAIE()
1544 ir_to_input0(wdata, &payload[5], false); in handler_drm_KAIE()
1545 ir_to_input1(wdata, &payload[7], true); in handler_drm_KAIE()
1546 ir_to_input2(wdata, &payload[10], false); in handler_drm_KAIE()
1547 ir_to_input3(wdata, &payload[12], true); in handler_drm_KAIE()
1548 handler_ext(wdata, &payload[15], 6); in handler_drm_KAIE()
1551 static void handler_drm_E(struct wiimote_data *wdata, const __u8 *payload) in handler_drm_E() argument
1553 handler_ext(wdata, payload, 21); in handler_drm_E()
1556 static void handler_drm_SKAI1(struct wiimote_data *wdata, const __u8 *payload) in handler_drm_SKAI1() argument
1558 handler_keys(wdata, payload); in handler_drm_SKAI1()
1560 wdata->state.accel_split[0] = payload[2]; in handler_drm_SKAI1()
1561 wdata->state.accel_split[1] = (payload[0] >> 1) & (0x10 | 0x20); in handler_drm_SKAI1()
1562 wdata->state.accel_split[1] |= (payload[1] << 1) & (0x40 | 0x80); in handler_drm_SKAI1()
1564 ir_to_input0(wdata, &payload[3], false); in handler_drm_SKAI1()
1565 ir_to_input1(wdata, &payload[12], false); in handler_drm_SKAI1()
1568 static void handler_drm_SKAI2(struct wiimote_data *wdata, const __u8 *payload) in handler_drm_SKAI2() argument
1572 handler_keys(wdata, payload); in handler_drm_SKAI2()
1574 wdata->state.accel_split[1] |= (payload[0] >> 5) & (0x01 | 0x02); in handler_drm_SKAI2()
1575 wdata->state.accel_split[1] |= (payload[1] >> 3) & (0x04 | 0x08); in handler_drm_SKAI2()
1580 buf[3] = payload[2]; in handler_drm_SKAI2()
1584 ir_to_input2(wdata, &payload[3], false); in handler_drm_SKAI2()
1585 ir_to_input3(wdata, &payload[12], false); in handler_drm_SKAI2()
1591 void (*func)(struct wiimote_data *wdata, const __u8 *payload);