Lines Matching refs:ext
823 static void wiimod_nunchuk_in_ext(struct wiimote_data *wdata, const __u8 *ext) in wiimod_nunchuk_in_ext() argument
857 bx = ext[0]; in wiimod_nunchuk_in_ext()
858 by = ext[1]; in wiimod_nunchuk_in_ext()
862 x = ext[2] << 2; in wiimod_nunchuk_in_ext()
863 y = ext[3] << 2; in wiimod_nunchuk_in_ext()
864 z = ext[4] << 2; in wiimod_nunchuk_in_ext()
867 x |= (ext[5] >> 3) & 0x02; in wiimod_nunchuk_in_ext()
868 y |= (ext[5] >> 4) & 0x02; in wiimod_nunchuk_in_ext()
870 z |= (ext[5] >> 5) & 0x06; in wiimod_nunchuk_in_ext()
872 x |= (ext[5] >> 2) & 0x03; in wiimod_nunchuk_in_ext()
873 y |= (ext[5] >> 4) & 0x03; in wiimod_nunchuk_in_ext()
874 z |= (ext[5] >> 6) & 0x03; in wiimod_nunchuk_in_ext()
891 !(ext[5] & 0x04)); in wiimod_nunchuk_in_ext()
894 !(ext[5] & 0x08)); in wiimod_nunchuk_in_ext()
898 !(ext[5] & 0x01)); in wiimod_nunchuk_in_ext()
901 !(ext[5] & 0x02)); in wiimod_nunchuk_in_ext()
1047 static void wiimod_classic_in_ext(struct wiimote_data *wdata, const __u8 *ext) in wiimod_classic_in_ext() argument
1095 lx = ext[0] & 0x3e; in wiimod_classic_in_ext()
1096 ly = ext[1] & 0x3e; in wiimod_classic_in_ext()
1098 lx = ext[0] & 0x3f; in wiimod_classic_in_ext()
1099 ly = ext[1] & 0x3f; in wiimod_classic_in_ext()
1102 rx = (ext[0] >> 3) & 0x18; in wiimod_classic_in_ext()
1103 rx |= (ext[1] >> 5) & 0x06; in wiimod_classic_in_ext()
1104 rx |= (ext[2] >> 7) & 0x01; in wiimod_classic_in_ext()
1105 ry = ext[2] & 0x1f; in wiimod_classic_in_ext()
1107 rt = ext[3] & 0x1f; in wiimod_classic_in_ext()
1108 lt = (ext[2] >> 2) & 0x18; in wiimod_classic_in_ext()
1109 lt |= (ext[3] >> 5) & 0x07; in wiimod_classic_in_ext()
1125 !(ext[4] & 0x80)); in wiimod_classic_in_ext()
1128 !(ext[4] & 0x40)); in wiimod_classic_in_ext()
1131 !(ext[4] & 0x20)); in wiimod_classic_in_ext()
1134 !(ext[4] & 0x10)); in wiimod_classic_in_ext()
1137 !(ext[4] & 0x08)); in wiimod_classic_in_ext()
1140 !(ext[4] & 0x04)); in wiimod_classic_in_ext()
1143 !(ext[4] & 0x02)); in wiimod_classic_in_ext()
1146 !(ext[5] & 0x80)); in wiimod_classic_in_ext()
1149 !(ext[5] & 0x40)); in wiimod_classic_in_ext()
1152 !(ext[5] & 0x20)); in wiimod_classic_in_ext()
1155 !(ext[5] & 0x10)); in wiimod_classic_in_ext()
1158 !(ext[5] & 0x08)); in wiimod_classic_in_ext()
1161 !(ext[5] & 0x04)); in wiimod_classic_in_ext()
1166 !(ext[1] & 0x01)); in wiimod_classic_in_ext()
1169 !(ext[0] & 0x01)); in wiimod_classic_in_ext()
1173 !(ext[5] & 0x02)); in wiimod_classic_in_ext()
1176 !(ext[5] & 0x01)); in wiimod_classic_in_ext()
1301 const __u8 *ext) in wiimod_bboard_in_ext() argument
1331 val[0] = ext[0]; in wiimod_bboard_in_ext()
1333 val[0] |= ext[1]; in wiimod_bboard_in_ext()
1335 val[1] = ext[2]; in wiimod_bboard_in_ext()
1337 val[1] |= ext[3]; in wiimod_bboard_in_ext()
1339 val[2] = ext[4]; in wiimod_bboard_in_ext()
1341 val[2] |= ext[5]; in wiimod_bboard_in_ext()
1343 val[3] = ext[6]; in wiimod_bboard_in_ext()
1345 val[3] |= ext[7]; in wiimod_bboard_in_ext()
1607 static void wiimod_pro_in_ext(struct wiimote_data *wdata, const __u8 *ext) in wiimod_pro_in_ext() argument
1652 lx = (ext[0] & 0xff) | ((ext[1] & 0x0f) << 8); in wiimod_pro_in_ext()
1653 rx = (ext[2] & 0xff) | ((ext[3] & 0x0f) << 8); in wiimod_pro_in_ext()
1654 ly = (ext[4] & 0xff) | ((ext[5] & 0x0f) << 8); in wiimod_pro_in_ext()
1655 ry = (ext[6] & 0xff) | ((ext[7] & 0x0f) << 8); in wiimod_pro_in_ext()
1693 !(ext[8] & 0x80)); in wiimod_pro_in_ext()
1696 !(ext[8] & 0x40)); in wiimod_pro_in_ext()
1699 !(ext[8] & 0x20)); in wiimod_pro_in_ext()
1702 !(ext[8] & 0x10)); in wiimod_pro_in_ext()
1705 !(ext[8] & 0x08)); in wiimod_pro_in_ext()
1708 !(ext[8] & 0x04)); in wiimod_pro_in_ext()
1711 !(ext[8] & 0x02)); in wiimod_pro_in_ext()
1715 !(ext[9] & 0x80)); in wiimod_pro_in_ext()
1718 !(ext[9] & 0x40)); in wiimod_pro_in_ext()
1721 !(ext[9] & 0x20)); in wiimod_pro_in_ext()
1724 !(ext[9] & 0x10)); in wiimod_pro_in_ext()
1727 !(ext[9] & 0x08)); in wiimod_pro_in_ext()
1730 !(ext[9] & 0x04)); in wiimod_pro_in_ext()
1733 !(ext[9] & 0x02)); in wiimod_pro_in_ext()
1736 !(ext[9] & 0x01)); in wiimod_pro_in_ext()
1740 !(ext[10] & 0x02)); in wiimod_pro_in_ext()
1743 !(ext[10] & 0x01)); in wiimod_pro_in_ext()
1978 static void wiimod_drums_in_ext(struct wiimote_data *wdata, const __u8 *ext) in wiimod_drums_in_ext() argument
2014 pressure = 7 - (ext[3] >> 5); in wiimod_drums_in_ext()
2015 which = (ext[2] >> 1) & 0x1f; in wiimod_drums_in_ext()
2016 none = !!(ext[2] & 0x40); in wiimod_drums_in_ext()
2017 hhp = !(ext[2] & 0x80); in wiimod_drums_in_ext()
2018 sx = ext[0] & 0x3f; in wiimod_drums_in_ext()
2019 sy = ext[1] & 0x3f; in wiimod_drums_in_ext()
2020 o = !(ext[5] & 0x80); in wiimod_drums_in_ext()
2021 r = !(ext[5] & 0x40); in wiimod_drums_in_ext()
2022 y = !(ext[5] & 0x20); in wiimod_drums_in_ext()
2023 g = !(ext[5] & 0x10); in wiimod_drums_in_ext()
2024 b = !(ext[5] & 0x08); in wiimod_drums_in_ext()
2025 bass = !(ext[5] & 0x04); in wiimod_drums_in_ext()
2026 bm = !(ext[4] & 0x10); in wiimod_drums_in_ext()
2027 bp = !(ext[4] & 0x04); in wiimod_drums_in_ext()
2207 static void wiimod_guitar_in_ext(struct wiimote_data *wdata, const __u8 *ext) in wiimod_guitar_in_ext() argument
2242 sx = ext[0] & 0x3f; in wiimod_guitar_in_ext()
2243 sy = ext[1] & 0x3f; in wiimod_guitar_in_ext()
2244 tb = ext[2] & 0x1f; in wiimod_guitar_in_ext()
2245 wb = ext[3] & 0x1f; in wiimod_guitar_in_ext()
2246 bd = !(ext[4] & 0x40); in wiimod_guitar_in_ext()
2247 bm = !(ext[4] & 0x10); in wiimod_guitar_in_ext()
2248 bp = !(ext[4] & 0x04); in wiimod_guitar_in_ext()
2249 bo = !(ext[5] & 0x80); in wiimod_guitar_in_ext()
2250 br = !(ext[5] & 0x40); in wiimod_guitar_in_ext()
2251 bb = !(ext[5] & 0x20); in wiimod_guitar_in_ext()
2252 bg = !(ext[5] & 0x10); in wiimod_guitar_in_ext()
2253 by = !(ext[5] & 0x08); in wiimod_guitar_in_ext()
2254 bu = !(ext[5] & 0x01); in wiimod_guitar_in_ext()
2257 bu = !(ext[0] & 0x01); in wiimod_guitar_in_ext()
2472 static void wiimod_mp_in_mp(struct wiimote_data *wdata, const __u8 *ext) in wiimod_mp_in_mp() argument
2500 x = ext[0]; in wiimod_mp_in_mp()
2501 y = ext[1]; in wiimod_mp_in_mp()
2502 z = ext[2]; in wiimod_mp_in_mp()
2504 x |= (((__u16)ext[3]) << 6) & 0xff00; in wiimod_mp_in_mp()
2505 y |= (((__u16)ext[4]) << 6) & 0xff00; in wiimod_mp_in_mp()
2506 z |= (((__u16)ext[5]) << 6) & 0xff00; in wiimod_mp_in_mp()
2512 if (!(ext[3] & 0x02)) in wiimod_mp_in_mp()
2516 if (!(ext[4] & 0x02)) in wiimod_mp_in_mp()
2520 if (!(ext[3] & 0x01)) in wiimod_mp_in_mp()