Lines Matching refs:rmem
384 ssize_t wiimote_cmd_read(struct wiimote_data *wdata, __u32 offset, __u8 *rmem, in wiimote_cmd_read() argument
392 wdata->state.cmd_read_buf = rmem; in wiimote_cmd_read()
435 static __u8 wiimote_cmd_read_ext(struct wiimote_data *wdata, __u8 *rmem) in wiimote_cmd_read_ext() argument
440 ret = wiimote_cmd_read(wdata, 0xa400fa, rmem, 6); in wiimote_cmd_read_ext()
444 hid_dbg(wdata->hdev, "extension ID: %6phC\n", rmem); in wiimote_cmd_read_ext()
446 if (rmem[0] == 0xff && rmem[1] == 0xff && rmem[2] == 0xff && in wiimote_cmd_read_ext()
447 rmem[3] == 0xff && rmem[4] == 0xff && rmem[5] == 0xff) in wiimote_cmd_read_ext()
450 if (rmem[4] == 0x00 && rmem[5] == 0x00) in wiimote_cmd_read_ext()
452 if (rmem[4] == 0x01 && rmem[5] == 0x01) in wiimote_cmd_read_ext()
454 if (rmem[4] == 0x04 && rmem[5] == 0x02) in wiimote_cmd_read_ext()
456 if (rmem[4] == 0x01 && rmem[5] == 0x20) in wiimote_cmd_read_ext()
505 static bool wiimote_cmd_read_mp(struct wiimote_data *wdata, __u8 *rmem) in wiimote_cmd_read_mp() argument
510 ret = wiimote_cmd_read(wdata, 0xa600fa, rmem, 6); in wiimote_cmd_read_mp()
514 hid_dbg(wdata->hdev, "motion plus ID: %6phC\n", rmem); in wiimote_cmd_read_mp()
516 if (rmem[5] == 0x05) in wiimote_cmd_read_mp()
519 hid_info(wdata->hdev, "unknown motion plus ID: %6phC\n", rmem); in wiimote_cmd_read_mp()
528 __u8 rmem[6]; in wiimote_cmd_read_mp_mapped() local
531 ret = wiimote_cmd_read(wdata, 0xa400fa, rmem, 6); in wiimote_cmd_read_mp_mapped()
535 hid_dbg(wdata->hdev, "mapped motion plus ID: %6phC\n", rmem); in wiimote_cmd_read_mp_mapped()
537 if (rmem[0] == 0xff && rmem[1] == 0xff && rmem[2] == 0xff && in wiimote_cmd_read_mp_mapped()
538 rmem[3] == 0xff && rmem[4] == 0xff && rmem[5] == 0xff) in wiimote_cmd_read_mp_mapped()
541 if (rmem[4] == 0x04 && rmem[5] == 0x05) in wiimote_cmd_read_mp_mapped()
543 else if (rmem[4] == 0x05 && rmem[5] == 0x05) in wiimote_cmd_read_mp_mapped()
545 else if (rmem[4] == 0x07 && rmem[5] == 0x05) in wiimote_cmd_read_mp_mapped()