Lines Matching refs:ext
820 static void wiimod_nunchuk_in_ext(struct wiimote_data *wdata, const __u8 *ext) in wiimod_nunchuk_in_ext() argument
854 bx = ext[0]; in wiimod_nunchuk_in_ext()
855 by = ext[1]; in wiimod_nunchuk_in_ext()
859 x = ext[2] << 2; in wiimod_nunchuk_in_ext()
860 y = ext[3] << 2; in wiimod_nunchuk_in_ext()
861 z = ext[4] << 2; in wiimod_nunchuk_in_ext()
864 x |= (ext[5] >> 3) & 0x02; in wiimod_nunchuk_in_ext()
865 y |= (ext[5] >> 4) & 0x02; in wiimod_nunchuk_in_ext()
867 z |= (ext[5] >> 5) & 0x06; in wiimod_nunchuk_in_ext()
869 x |= (ext[5] >> 2) & 0x03; in wiimod_nunchuk_in_ext()
870 y |= (ext[5] >> 4) & 0x03; in wiimod_nunchuk_in_ext()
871 z |= (ext[5] >> 6) & 0x03; in wiimod_nunchuk_in_ext()
888 !(ext[5] & 0x04)); in wiimod_nunchuk_in_ext()
891 !(ext[5] & 0x08)); in wiimod_nunchuk_in_ext()
895 !(ext[5] & 0x01)); in wiimod_nunchuk_in_ext()
898 !(ext[5] & 0x02)); in wiimod_nunchuk_in_ext()
1044 static void wiimod_classic_in_ext(struct wiimote_data *wdata, const __u8 *ext) in wiimod_classic_in_ext() argument
1095 lx = digital_to_analog[1 - !(ext[4] & 0x80) in wiimod_classic_in_ext()
1096 + !(ext[1] & 0x01)]; in wiimod_classic_in_ext()
1097 ly = digital_to_analog[1 - !(ext[4] & 0x40) in wiimod_classic_in_ext()
1098 + !(ext[0] & 0x01)]; in wiimod_classic_in_ext()
1100 lx = (ext[0] & 0x3e) - 0x20; in wiimod_classic_in_ext()
1101 ly = (ext[1] & 0x3e) - 0x20; in wiimod_classic_in_ext()
1105 lx = digital_to_analog[1 - !(ext[4] & 0x80) in wiimod_classic_in_ext()
1106 + !(ext[5] & 0x02)]; in wiimod_classic_in_ext()
1107 ly = digital_to_analog[1 - !(ext[4] & 0x40) in wiimod_classic_in_ext()
1108 + !(ext[5] & 0x01)]; in wiimod_classic_in_ext()
1110 lx = (ext[0] & 0x3f) - 0x20; in wiimod_classic_in_ext()
1111 ly = (ext[1] & 0x3f) - 0x20; in wiimod_classic_in_ext()
1115 rx = (ext[0] >> 3) & 0x18; in wiimod_classic_in_ext()
1116 rx |= (ext[1] >> 5) & 0x06; in wiimod_classic_in_ext()
1117 rx |= (ext[2] >> 7) & 0x01; in wiimod_classic_in_ext()
1118 ry = ext[2] & 0x1f; in wiimod_classic_in_ext()
1120 rt = ext[3] & 0x1f; in wiimod_classic_in_ext()
1121 lt = (ext[2] >> 2) & 0x18; in wiimod_classic_in_ext()
1122 lt |= (ext[3] >> 5) & 0x07; in wiimod_classic_in_ext()
1138 !(ext[4] & 0x20)); in wiimod_classic_in_ext()
1141 !(ext[4] & 0x10)); in wiimod_classic_in_ext()
1144 !(ext[4] & 0x08)); in wiimod_classic_in_ext()
1147 !(ext[4] & 0x04)); in wiimod_classic_in_ext()
1150 !(ext[4] & 0x02)); in wiimod_classic_in_ext()
1153 !(ext[5] & 0x80)); in wiimod_classic_in_ext()
1156 !(ext[5] & 0x40)); in wiimod_classic_in_ext()
1159 !(ext[5] & 0x20)); in wiimod_classic_in_ext()
1162 !(ext[5] & 0x10)); in wiimod_classic_in_ext()
1165 !(ext[5] & 0x08)); in wiimod_classic_in_ext()
1168 !(ext[5] & 0x04)); in wiimod_classic_in_ext()
1173 !(ext[4] & 0x80)); in wiimod_classic_in_ext()
1176 !(ext[4] & 0x40)); in wiimod_classic_in_ext()
1181 !(ext[1] & 0x01)); in wiimod_classic_in_ext()
1184 !(ext[0] & 0x01)); in wiimod_classic_in_ext()
1188 !(ext[5] & 0x02)); in wiimod_classic_in_ext()
1191 !(ext[5] & 0x01)); in wiimod_classic_in_ext()
1317 const __u8 *ext) in wiimod_bboard_in_ext() argument
1347 val[0] = ext[0]; in wiimod_bboard_in_ext()
1349 val[0] |= ext[1]; in wiimod_bboard_in_ext()
1351 val[1] = ext[2]; in wiimod_bboard_in_ext()
1353 val[1] |= ext[3]; in wiimod_bboard_in_ext()
1355 val[2] = ext[4]; in wiimod_bboard_in_ext()
1357 val[2] |= ext[5]; in wiimod_bboard_in_ext()
1359 val[3] = ext[6]; in wiimod_bboard_in_ext()
1361 val[3] |= ext[7]; in wiimod_bboard_in_ext()
1623 static void wiimod_pro_in_ext(struct wiimote_data *wdata, const __u8 *ext) in wiimod_pro_in_ext() argument
1668 lx = (ext[0] & 0xff) | ((ext[1] & 0x0f) << 8); in wiimod_pro_in_ext()
1669 rx = (ext[2] & 0xff) | ((ext[3] & 0x0f) << 8); in wiimod_pro_in_ext()
1670 ly = (ext[4] & 0xff) | ((ext[5] & 0x0f) << 8); in wiimod_pro_in_ext()
1671 ry = (ext[6] & 0xff) | ((ext[7] & 0x0f) << 8); in wiimod_pro_in_ext()
1709 !(ext[8] & 0x80)); in wiimod_pro_in_ext()
1712 !(ext[8] & 0x40)); in wiimod_pro_in_ext()
1715 !(ext[8] & 0x20)); in wiimod_pro_in_ext()
1718 !(ext[8] & 0x10)); in wiimod_pro_in_ext()
1721 !(ext[8] & 0x08)); in wiimod_pro_in_ext()
1724 !(ext[8] & 0x04)); in wiimod_pro_in_ext()
1727 !(ext[8] & 0x02)); in wiimod_pro_in_ext()
1731 !(ext[9] & 0x80)); in wiimod_pro_in_ext()
1734 !(ext[9] & 0x40)); in wiimod_pro_in_ext()
1737 !(ext[9] & 0x20)); in wiimod_pro_in_ext()
1740 !(ext[9] & 0x10)); in wiimod_pro_in_ext()
1743 !(ext[9] & 0x08)); in wiimod_pro_in_ext()
1746 !(ext[9] & 0x04)); in wiimod_pro_in_ext()
1749 !(ext[9] & 0x02)); in wiimod_pro_in_ext()
1752 !(ext[9] & 0x01)); in wiimod_pro_in_ext()
1756 !(ext[10] & 0x02)); in wiimod_pro_in_ext()
1759 !(ext[10] & 0x01)); in wiimod_pro_in_ext()
1994 static void wiimod_drums_in_ext(struct wiimote_data *wdata, const __u8 *ext) in wiimod_drums_in_ext() argument
2030 pressure = 7 - (ext[3] >> 5); in wiimod_drums_in_ext()
2031 which = (ext[2] >> 1) & 0x1f; in wiimod_drums_in_ext()
2032 none = !!(ext[2] & 0x40); in wiimod_drums_in_ext()
2033 hhp = !(ext[2] & 0x80); in wiimod_drums_in_ext()
2034 sx = ext[0] & 0x3f; in wiimod_drums_in_ext()
2035 sy = ext[1] & 0x3f; in wiimod_drums_in_ext()
2036 o = !(ext[5] & 0x80); in wiimod_drums_in_ext()
2037 r = !(ext[5] & 0x40); in wiimod_drums_in_ext()
2038 y = !(ext[5] & 0x20); in wiimod_drums_in_ext()
2039 g = !(ext[5] & 0x10); in wiimod_drums_in_ext()
2040 b = !(ext[5] & 0x08); in wiimod_drums_in_ext()
2041 bass = !(ext[5] & 0x04); in wiimod_drums_in_ext()
2042 bm = !(ext[4] & 0x10); in wiimod_drums_in_ext()
2043 bp = !(ext[4] & 0x04); in wiimod_drums_in_ext()
2223 static void wiimod_guitar_in_ext(struct wiimote_data *wdata, const __u8 *ext) in wiimod_guitar_in_ext() argument
2258 sx = ext[0] & 0x3f; in wiimod_guitar_in_ext()
2259 sy = ext[1] & 0x3f; in wiimod_guitar_in_ext()
2260 tb = ext[2] & 0x1f; in wiimod_guitar_in_ext()
2261 wb = ext[3] & 0x1f; in wiimod_guitar_in_ext()
2262 bd = !(ext[4] & 0x40); in wiimod_guitar_in_ext()
2263 bm = !(ext[4] & 0x10); in wiimod_guitar_in_ext()
2264 bp = !(ext[4] & 0x04); in wiimod_guitar_in_ext()
2265 bo = !(ext[5] & 0x80); in wiimod_guitar_in_ext()
2266 br = !(ext[5] & 0x40); in wiimod_guitar_in_ext()
2267 bb = !(ext[5] & 0x20); in wiimod_guitar_in_ext()
2268 bg = !(ext[5] & 0x10); in wiimod_guitar_in_ext()
2269 by = !(ext[5] & 0x08); in wiimod_guitar_in_ext()
2270 bu = !(ext[5] & 0x01); in wiimod_guitar_in_ext()
2273 bu = !(ext[0] & 0x01); in wiimod_guitar_in_ext()
2488 static void wiimod_mp_in_mp(struct wiimote_data *wdata, const __u8 *ext) in wiimod_mp_in_mp() argument
2516 x = ext[0]; in wiimod_mp_in_mp()
2517 y = ext[1]; in wiimod_mp_in_mp()
2518 z = ext[2]; in wiimod_mp_in_mp()
2520 x |= (((__u16)ext[3]) << 6) & 0xff00; in wiimod_mp_in_mp()
2521 y |= (((__u16)ext[4]) << 6) & 0xff00; in wiimod_mp_in_mp()
2522 z |= (((__u16)ext[5]) << 6) & 0xff00; in wiimod_mp_in_mp()
2528 if (!(ext[3] & 0x02)) in wiimod_mp_in_mp()
2532 if (!(ext[4] & 0x02)) in wiimod_mp_in_mp()
2536 if (!(ext[3] & 0x01)) in wiimod_mp_in_mp()