1*627096b6Sthfr /* $OpenBSD: uhid_rdesc.h,v 1.2 2022/03/21 12:18:52 thfr Exp $ */ 24ea647b0Sjeremy /* $NetBSD: ugraphire_rdesc.h,v 1.1 2000/12/29 01:47:49 augustss Exp $ */ 34ea647b0Sjeremy /* $FreeBSD: uxb360gp_rdesc.h,v 1.3 2008/05/24 18:35:55 ed Exp $ */ 44ea647b0Sjeremy /* 54ea647b0Sjeremy * Copyright (c) 2000 Nick Hibma <n_hibma@freebsd.org> 64ea647b0Sjeremy * Copyright (c) 2005 Ed Schouten <ed@FreeBSD.org> 74ea647b0Sjeremy * All rights reserved. 84ea647b0Sjeremy * 94ea647b0Sjeremy * Redistribution and use in source and binary forms, with or without 104ea647b0Sjeremy * modification, are permitted provided that the following conditions 114ea647b0Sjeremy * are met: 124ea647b0Sjeremy * 1. Redistributions of source code must retain the above copyright 134ea647b0Sjeremy * notice, this list of conditions and the following disclaimer. 144ea647b0Sjeremy * 2. Redistributions in binary form must reproduce the above copyright 154ea647b0Sjeremy * notice, this list of conditions and the following disclaimer in the 164ea647b0Sjeremy * documentation and/or other materials provided with the distribution. 174ea647b0Sjeremy * 184ea647b0Sjeremy * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 194ea647b0Sjeremy * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 204ea647b0Sjeremy * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 214ea647b0Sjeremy * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 224ea647b0Sjeremy * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 234ea647b0Sjeremy * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 244ea647b0Sjeremy * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 254ea647b0Sjeremy * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 264ea647b0Sjeremy * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 274ea647b0Sjeremy * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 284ea647b0Sjeremy * SUCH DAMAGE. 294ea647b0Sjeremy */ 304ea647b0Sjeremy 314ea647b0Sjeremy static uByte uhid_graphire_report_descr[] = { 324ea647b0Sjeremy 0x05, 0x0d, /* USAGE_PAGE (Digitizers) */ 334ea647b0Sjeremy 0x09, 0x01, /* USAGE (Digitizer) */ 344ea647b0Sjeremy 0xa1, 0x01, /* COLLECTION (Application) */ 354ea647b0Sjeremy 0x85, 0x02, /* REPORT_ID (2) */ 364ea647b0Sjeremy 0x05, 0x0d, /* USAGE_PAGE (Digitizers) */ 374ea647b0Sjeremy 0x09, 0x01, /* USAGE (Digitizer) */ 384ea647b0Sjeremy 0xa1, 0x00, /* COLLECTION (Physical) */ 394ea647b0Sjeremy 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ 404ea647b0Sjeremy 0x25, 0x01, /* LOGICAL_MAXIMUM (1) */ 414ea647b0Sjeremy 0x09, 0x33, /* USAGE (Touch) */ 424ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 434ea647b0Sjeremy 0x75, 0x01, /* REPORT_SIZE (1) */ 444ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 454ea647b0Sjeremy 0x09, 0x44, /* USAGE (Barrel Switch) */ 464ea647b0Sjeremy 0x95, 0x02, /* REPORT_COUNT (2) */ 474ea647b0Sjeremy 0x75, 0x01, /* REPORT_SIZE (1) */ 484ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 494ea647b0Sjeremy 0x09, 0x00, /* USAGE (Undefined) */ 504ea647b0Sjeremy 0x95, 0x02, /* REPORT_COUNT (2) */ 514ea647b0Sjeremy 0x75, 0x01, /* REPORT_SIZE (1) */ 524ea647b0Sjeremy 0x81, 0x03, /* INPUT (Cnst,Var,Abs) */ 534ea647b0Sjeremy 0x09, 0x3c, /* USAGE (Invert) */ 544ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 554ea647b0Sjeremy 0x75, 0x01, /* REPORT_SIZE (1) */ 564ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 574ea647b0Sjeremy 0x09, 0x38, /* USAGE (Transducer Index) */ 584ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 594ea647b0Sjeremy 0x75, 0x01, /* REPORT_SIZE (1) */ 604ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 614ea647b0Sjeremy 0x09, 0x32, /* USAGE (In Range) */ 624ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 634ea647b0Sjeremy 0x75, 0x01, /* REPORT_SIZE (1) */ 644ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 654ea647b0Sjeremy 0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */ 664ea647b0Sjeremy 0x09, 0x30, /* USAGE (X) */ 674ea647b0Sjeremy 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ 684ea647b0Sjeremy 0x26, 0xde, 0x27, /* LOGICAL_MAXIMUM (10206) */ 694ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 704ea647b0Sjeremy 0x75, 0x10, /* REPORT_SIZE (16) */ 714ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 724ea647b0Sjeremy 0x09, 0x31, /* USAGE (Y) */ 734ea647b0Sjeremy 0x26, 0xfe, 0x1c, /* LOGICAL_MAXIMUM (7422) */ 744ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 754ea647b0Sjeremy 0x75, 0x10, /* REPORT_SIZE (16) */ 764ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 774ea647b0Sjeremy 0x05, 0x0d, /* USAGE_PAGE (Digitizers) */ 784ea647b0Sjeremy 0x09, 0x30, /* USAGE (Tip Pressure) */ 794ea647b0Sjeremy 0x26, 0xff, 0x01, /* LOGICAL_MAXIMUM (511) */ 804ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 814ea647b0Sjeremy 0x75, 0x10, /* REPORT_SIZE (16) */ 824ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 834ea647b0Sjeremy 0xc0, /* END_COLLECTION */ 844ea647b0Sjeremy 0x05, 0x0d, /* USAGE_PAGE (Digitizers) */ 854ea647b0Sjeremy 0x09, 0x00, /* USAGE (Undefined) */ 864ea647b0Sjeremy 0x85, 0x02, /* REPORT_ID (2) */ 874ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 884ea647b0Sjeremy 0xb1, 0x02, /* FEATURE (Data,Var,Abs) */ 894ea647b0Sjeremy 0x09, 0x00, /* USAGE (Undefined) */ 904ea647b0Sjeremy 0x85, 0x03, /* REPORT_ID (3) */ 914ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 924ea647b0Sjeremy 0xb1, 0x02, /* FEATURE (Data,Var,Abs) */ 934ea647b0Sjeremy 0xc0, /* END_COLLECTION */ 944ea647b0Sjeremy }; 954ea647b0Sjeremy 964ea647b0Sjeremy static uByte uhid_graphire3_4x5_report_descr[] = { 974ea647b0Sjeremy 0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */ 984ea647b0Sjeremy 0x09, 0x02, /* USAGE (Mouse) */ 994ea647b0Sjeremy 0xa1, 0x01, /* COLLECTION (Application) */ 1004ea647b0Sjeremy 0x85, 0x01, /* REPORT_ID (1) */ 1014ea647b0Sjeremy 0x09, 0x01, /* USAGE (Pointer) */ 1024ea647b0Sjeremy 0xa1, 0x00, /* COLLECTION (Physical) */ 1034ea647b0Sjeremy 0x05, 0x09, /* USAGE_PAGE (Button) */ 1044ea647b0Sjeremy 0x19, 0x01, /* USAGE_MINIMUM (Button 1) */ 1054ea647b0Sjeremy 0x29, 0x03, /* USAGE_MAXIMUM (Button 3) */ 1064ea647b0Sjeremy 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ 1074ea647b0Sjeremy 0x25, 0x01, /* LOGICAL_MAXIMUM (1) */ 1084ea647b0Sjeremy 0x95, 0x03, /* REPORT_COUNT (3) */ 1094ea647b0Sjeremy 0x75, 0x01, /* REPORT_SIZE (1) */ 1104ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 1114ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 1124ea647b0Sjeremy 0x75, 0x05, /* REPORT_SIZE (5) */ 1134ea647b0Sjeremy 0x81, 0x01, /* INPUT (Cnst,Ary,Abs) */ 1144ea647b0Sjeremy 0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */ 1154ea647b0Sjeremy 0x09, 0x30, /* USAGE (X) */ 1164ea647b0Sjeremy 0x09, 0x31, /* USAGE (Y) */ 1174ea647b0Sjeremy 0x09, 0x38, /* USAGE (Wheel) */ 1184ea647b0Sjeremy 0x15, 0x81, /* LOGICAL_MINIMUM (-127) */ 1194ea647b0Sjeremy 0x25, 0x7f, /* LOGICAL_MAXIMUM (127) */ 1204ea647b0Sjeremy 0x75, 0x08, /* REPORT_SIZE (8) */ 1214ea647b0Sjeremy 0x95, 0x03, /* REPORT_COUNT (3) */ 1224ea647b0Sjeremy 0x81, 0x06, /* INPUT (Data,Var,Rel) */ 1234ea647b0Sjeremy 0xc0, /* END_COLLECTION */ 1244ea647b0Sjeremy 0xc0, /* END_COLLECTION */ 1254ea647b0Sjeremy 0x05, 0x0d, /* USAGE_PAGE (Digitizers) */ 1264ea647b0Sjeremy 0x09, 0x01, /* USAGE (Pointer) */ 1274ea647b0Sjeremy 0xa1, 0x01, /* COLLECTION (Application) */ 1284ea647b0Sjeremy 0x85, 0x02, /* REPORT_ID (2) */ 1294ea647b0Sjeremy 0x05, 0x0d, /* USAGE_PAGE (Digitizers) */ 1304ea647b0Sjeremy 0x09, 0x01, /* USAGE (Digitizer) */ 1314ea647b0Sjeremy 0xa1, 0x00, /* COLLECTION (Physical) */ 1324ea647b0Sjeremy 0x09, 0x33, /* USAGE (Touch) */ 1334ea647b0Sjeremy 0x09, 0x44, /* USAGE (Barrel Switch) */ 1344ea647b0Sjeremy 0x09, 0x44, /* USAGE (Barrel Switch) */ 1354ea647b0Sjeremy 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ 1364ea647b0Sjeremy 0x25, 0x01, /* LOGICAL_MAXIMUM (1) */ 1374ea647b0Sjeremy 0x75, 0x01, /* REPORT_SIZE (1) */ 1384ea647b0Sjeremy 0x95, 0x03, /* REPORT_COUNT (3) */ 1394ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 1404ea647b0Sjeremy 0x75, 0x01, /* REPORT_SIZE (1) */ 1414ea647b0Sjeremy 0x95, 0x02, /* REPORT_COUNT (2) */ 1424ea647b0Sjeremy 0x81, 0x01, /* INPUT (Cnst,Ary,Abs) */ 1434ea647b0Sjeremy 0x09, 0x3c, /* USAGE (Invert) */ 1444ea647b0Sjeremy 0x09, 0x38, /* USAGE (Transducer Index) */ 1454ea647b0Sjeremy 0x09, 0x32, /* USAGE (In Range) */ 1464ea647b0Sjeremy 0x75, 0x01, /* REPORT_SIZE (1) */ 1474ea647b0Sjeremy 0x95, 0x03, /* REPORT_COUNT (3) */ 1484ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 1494ea647b0Sjeremy 0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */ 1504ea647b0Sjeremy 0x09, 0x30, /* USAGE (X) */ 1514ea647b0Sjeremy 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ 1524ea647b0Sjeremy 0x26, 0xde, 0x27, /* LOGICAL_MAXIMUM (10206) */ 1534ea647b0Sjeremy 0x75, 0x10, /* REPORT_SIZE (16) */ 1544ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 1554ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 1564ea647b0Sjeremy 0x09, 0x31, /* USAGE (Y) */ 1574ea647b0Sjeremy 0x26, 0xfe, 0x1c, /* LOGICAL_MAXIMUM (7422) */ 1584ea647b0Sjeremy 0x75, 0x10, /* REPORT_SIZE (16) */ 1594ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 1604ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 1614ea647b0Sjeremy 0x05, 0x0d, /* USAGE_PAGE (Digitizers) */ 1624ea647b0Sjeremy 0x09, 0x30, /* USAGE (Tip Pressure) */ 1634ea647b0Sjeremy 0x26, 0xff, 0x01, /* LOGICAL_MAXIMUM (511) */ 1644ea647b0Sjeremy 0x75, 0x10, /* REPORT_SIZE (16) */ 1654ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 1664ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data,Var,Abs) */ 1674ea647b0Sjeremy 0xc0, /* END_COLLECTION */ 1684ea647b0Sjeremy 0x05, 0x0d, /* USAGE_PAGE (Digitizers) */ 1694ea647b0Sjeremy 0x09, 0x00, /* USAGE (Undefined) */ 1704ea647b0Sjeremy 0x85, 0x02, /* REPORT_ID (2) */ 1714ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 1724ea647b0Sjeremy 0xb1, 0x02, /* FEATURE (Data,Var,Abs) */ 1734ea647b0Sjeremy 0x09, 0x00, /* USAGE (Undefined) */ 1744ea647b0Sjeremy 0x85, 0x03, /* REPORT_ID (3) */ 1754ea647b0Sjeremy 0x95, 0x01, /* REPORT_COUNT (1) */ 1764ea647b0Sjeremy 0xb1, 0x02, /* FEATURE (Data,Var,Abs) */ 1774ea647b0Sjeremy 0xc0 /* END_COLLECTION */ 1784ea647b0Sjeremy }; 1794ea647b0Sjeremy 1804ea647b0Sjeremy /* 1814ea647b0Sjeremy * The descriptor has no output report format, thus preventing you from 1824ea647b0Sjeremy * controlling the LEDs and the built-in rumblers. 1834ea647b0Sjeremy */ 1844ea647b0Sjeremy static const uByte uhid_xb360gp_report_descr[] = { 1854ea647b0Sjeremy 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 1864ea647b0Sjeremy 0x09, 0x05, /* USAGE (Gamepad) */ 1874ea647b0Sjeremy 0xa1, 0x01, /* COLLECTION (Application) */ 1884ea647b0Sjeremy /* Unused */ 1894ea647b0Sjeremy 0x75, 0x08, /* REPORT SIZE (8) */ 1904ea647b0Sjeremy 0x95, 0x01, /* REPORT COUNT (1) */ 1914ea647b0Sjeremy 0x81, 0x01, /* INPUT (Constant) */ 1924ea647b0Sjeremy /* Byte count */ 1934ea647b0Sjeremy 0x75, 0x08, /* REPORT SIZE (8) */ 1944ea647b0Sjeremy 0x95, 0x01, /* REPORT COUNT (1) */ 1954ea647b0Sjeremy 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 1964ea647b0Sjeremy 0x09, 0x3b, /* USAGE (Byte Count) */ 1974ea647b0Sjeremy 0x81, 0x01, /* INPUT (Constant) */ 1984ea647b0Sjeremy /* D-Pad */ 1994ea647b0Sjeremy 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 2004ea647b0Sjeremy 0x09, 0x01, /* USAGE (Pointer) */ 2014ea647b0Sjeremy 0xa1, 0x00, /* COLLECTION (Physical) */ 2024ea647b0Sjeremy 0x75, 0x01, /* REPORT SIZE (1) */ 2034ea647b0Sjeremy 0x15, 0x00, /* LOGICAL MINIMUM (0) */ 2044ea647b0Sjeremy 0x25, 0x01, /* LOGICAL MAXIMUM (1) */ 2054ea647b0Sjeremy 0x35, 0x00, /* PHYSICAL MINIMUM (0) */ 2064ea647b0Sjeremy 0x45, 0x01, /* PHYSICAL MAXIMUM (1) */ 2074ea647b0Sjeremy 0x95, 0x04, /* REPORT COUNT (4) */ 2084ea647b0Sjeremy 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 2094ea647b0Sjeremy 0x09, 0x90, /* USAGE (D-Pad Up) */ 2104ea647b0Sjeremy 0x09, 0x91, /* USAGE (D-Pad Down) */ 2114ea647b0Sjeremy 0x09, 0x93, /* USAGE (D-Pad Left) */ 2124ea647b0Sjeremy 0x09, 0x92, /* USAGE (D-Pad Right) */ 2134ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 2144ea647b0Sjeremy 0xc0, /* END COLLECTION */ 2154ea647b0Sjeremy /* Buttons 5-11 */ 2164ea647b0Sjeremy 0x75, 0x01, /* REPORT SIZE (1) */ 2174ea647b0Sjeremy 0x15, 0x00, /* LOGICAL MINIMUM (0) */ 2184ea647b0Sjeremy 0x25, 0x01, /* LOGICAL MAXIMUM (1) */ 2194ea647b0Sjeremy 0x35, 0x00, /* PHYSICAL MINIMUM (0) */ 2204ea647b0Sjeremy 0x45, 0x01, /* PHYSICAL MAXIMUM (1) */ 2214ea647b0Sjeremy 0x95, 0x07, /* REPORT COUNT (7) */ 2224ea647b0Sjeremy 0x05, 0x09, /* USAGE PAGE (Button) */ 2234ea647b0Sjeremy 0x09, 0x08, /* USAGE (Button 8) */ 2244ea647b0Sjeremy 0x09, 0x07, /* USAGE (Button 7) */ 2254ea647b0Sjeremy 0x09, 0x09, /* USAGE (Button 9) */ 2264ea647b0Sjeremy 0x09, 0x0a, /* USAGE (Button 10) */ 2274ea647b0Sjeremy 0x09, 0x05, /* USAGE (Button 5) */ 2284ea647b0Sjeremy 0x09, 0x06, /* USAGE (Button 6) */ 2294ea647b0Sjeremy 0x09, 0x0b, /* USAGE (Button 11) */ 2304ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 2314ea647b0Sjeremy /* Unused */ 2324ea647b0Sjeremy 0x75, 0x01, /* REPORT SIZE (1) */ 2334ea647b0Sjeremy 0x95, 0x01, /* REPORT COUNT (1) */ 2344ea647b0Sjeremy 0x81, 0x01, /* INPUT (Constant) */ 2354ea647b0Sjeremy /* Buttons 1-4 */ 2364ea647b0Sjeremy 0x75, 0x01, /* REPORT SIZE (1) */ 2374ea647b0Sjeremy 0x15, 0x00, /* LOGICAL MINIMUM (0) */ 2384ea647b0Sjeremy 0x25, 0x01, /* LOGICAL MAXIMUM (1) */ 2394ea647b0Sjeremy 0x35, 0x00, /* PHYSICAL MINIMUM (0) */ 2404ea647b0Sjeremy 0x45, 0x01, /* PHYSICAL MAXIMUM (1) */ 2414ea647b0Sjeremy 0x95, 0x04, /* REPORT COUNT (4) */ 2424ea647b0Sjeremy 0x05, 0x09, /* USAGE PAGE (Button) */ 2434ea647b0Sjeremy 0x19, 0x01, /* USAGE MINIMUM (Button 1) */ 2444ea647b0Sjeremy 0x29, 0x04, /* USAGE MAXIMUM (Button 4) */ 2454ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 2464ea647b0Sjeremy /* Triggers */ 2474ea647b0Sjeremy 0x75, 0x08, /* REPORT SIZE (8) */ 2484ea647b0Sjeremy 0x15, 0x00, /* LOGICAL MINIMUM (0) */ 2494ea647b0Sjeremy 0x26, 0xff, 0x00, /* LOGICAL MAXIMUM (255) */ 2504ea647b0Sjeremy 0x35, 0x00, /* PHYSICAL MINIMUM (0) */ 2514ea647b0Sjeremy 0x46, 0xff, 0x00, /* PHYSICAL MAXIMUM (255) */ 2524ea647b0Sjeremy 0x95, 0x02, /* REPORT SIZE (2) */ 2534ea647b0Sjeremy 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 2544ea647b0Sjeremy 0x09, 0x32, /* USAGE (Z) */ 2554ea647b0Sjeremy 0x09, 0x35, /* USAGE (Rz) */ 2564ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 2574ea647b0Sjeremy /* Sticks */ 2584ea647b0Sjeremy 0x75, 0x10, /* REPORT SIZE (16) */ 2594ea647b0Sjeremy 0x16, 0x00, 0x80, /* LOGICAL MINIMUM (-32768) */ 2604ea647b0Sjeremy 0x26, 0xff, 0x7f, /* LOGICAL MAXIMUM (32767) */ 2614ea647b0Sjeremy 0x36, 0x00, 0x80, /* PHYSICAL MINIMUM (-32768) */ 2624ea647b0Sjeremy 0x46, 0xff, 0x7f, /* PHYSICAL MAXIMUM (32767) */ 2634ea647b0Sjeremy 0x95, 0x04, /* REPORT COUNT (4) */ 2644ea647b0Sjeremy 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 2654ea647b0Sjeremy 0x09, 0x30, /* USAGE (X) */ 2664ea647b0Sjeremy 0x09, 0x31, /* USAGE (Y) */ 2674ea647b0Sjeremy 0x09, 0x33, /* USAGE (Rx) */ 2684ea647b0Sjeremy 0x09, 0x34, /* USAGE (Ry) */ 2694ea647b0Sjeremy 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 2704ea647b0Sjeremy /* Unused */ 2714ea647b0Sjeremy 0x75, 0x30, /* REPORT SIZE (48) */ 2724ea647b0Sjeremy 0x95, 0x01, /* REPORT COUNT (1) */ 2734ea647b0Sjeremy 0x81, 0x01, /* INPUT (Constant) */ 2744ea647b0Sjeremy 0xc0, /* END COLLECTION */ 2754ea647b0Sjeremy }; 276*627096b6Sthfr 277*627096b6Sthfr static const uByte uhid_xbonegp_report_descr[] = { 278*627096b6Sthfr 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 279*627096b6Sthfr 0x09, 0x05, /* USAGE (Gamepad) */ 280*627096b6Sthfr 0xa1, 0x01, /* COLLECTION (Application) */ 281*627096b6Sthfr /* Button packet */ 282*627096b6Sthfr 0xa1, 0x00, /* COLLECTION (Physical) */ 283*627096b6Sthfr 0x85, 0x20, /* REPORT ID (0x20) */ 284*627096b6Sthfr /* Skip unknown field and counter */ 285*627096b6Sthfr 0x09, 0x00, /* USAGE (Undefined) */ 286*627096b6Sthfr 0x75, 0x08, /* REPORT SIZE (8) */ 287*627096b6Sthfr 0x95, 0x02, /* REPORT COUNT (2) */ 288*627096b6Sthfr 0x81, 0x03, /* INPUT (Constant, Variable, Absolute) */ 289*627096b6Sthfr /* Payload size */ 290*627096b6Sthfr 0x09, 0x3b, /* USAGE (Byte Count) */ 291*627096b6Sthfr 0x95, 0x01, /* REPORT COUNT (1) */ 292*627096b6Sthfr 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 293*627096b6Sthfr /* 16 Buttons: 1-2=Unknown, 3=Start, 4=Back, 5-8=ABXY, 294*627096b6Sthfr * 9-12=D-Pad(Up,Dn,Lt,Rt), 13=LB, 14=RB, 15=LS, 16=RS 295*627096b6Sthfr */ 296*627096b6Sthfr /* Skip the first 2 as they are not used */ 297*627096b6Sthfr 0x75, 0x01, /* REPORT SIZE (1) */ 298*627096b6Sthfr 0x95, 0x02, /* REPORT COUNT (2) */ 299*627096b6Sthfr 0x81, 0x01, /* INPUT (Constant) */ 300*627096b6Sthfr /* Assign buttons Start(7), Back(8), ABXY(1-4) */ 301*627096b6Sthfr 0x15, 0x00, /* LOGICAL MINIMUM (0) */ 302*627096b6Sthfr 0x25, 0x01, /* LOGICAL MAXIMUM (1) */ 303*627096b6Sthfr 0x95, 0x06, /* REPORT COUNT (6) */ 304*627096b6Sthfr 0x05, 0x09, /* USAGE PAGE (Button) */ 305*627096b6Sthfr 0x09, 0x08, /* USAGE (Button 8) */ 306*627096b6Sthfr 0x09, 0x07, /* USAGE (Button 7) */ 307*627096b6Sthfr 0x09, 0x01, /* USAGE (Button 1) */ 308*627096b6Sthfr 0x09, 0x02, /* USAGE (Button 2) */ 309*627096b6Sthfr 0x09, 0x03, /* USAGE (Button 3) */ 310*627096b6Sthfr 0x09, 0x04, /* USAGE (Button 4) */ 311*627096b6Sthfr 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 312*627096b6Sthfr /* D-Pad */ 313*627096b6Sthfr 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 314*627096b6Sthfr 0x09, 0x01, /* USAGE (Pointer) */ 315*627096b6Sthfr 0xa1, 0x00, /* COLLECTION (Physical) */ 316*627096b6Sthfr 0x75, 0x01, /* REPORT SIZE (1) */ 317*627096b6Sthfr 0x15, 0x00, /* LOGICAL MINIMUM (0) */ 318*627096b6Sthfr 0x25, 0x01, /* LOGICAL MAXIMUM (1) */ 319*627096b6Sthfr 0x95, 0x04, /* REPORT COUNT (4) */ 320*627096b6Sthfr 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 321*627096b6Sthfr 0x09, 0x90, /* USAGE (D-Pad Up) */ 322*627096b6Sthfr 0x09, 0x91, /* USAGE (D-Pad Down) */ 323*627096b6Sthfr 0x09, 0x93, /* USAGE (D-Pad Left) */ 324*627096b6Sthfr 0x09, 0x92, /* USAGE (D-Pad Right) */ 325*627096b6Sthfr 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 326*627096b6Sthfr 0xc0, /* END COLLECTION */ 327*627096b6Sthfr /* Buttons 5-6 (Shoulder Buttons) and 9-10 (Stick Buttons) */ 328*627096b6Sthfr 0x15, 0x00, /* LOGICAL MINIMUM (0) */ 329*627096b6Sthfr 0x25, 0x01, /* LOGICAL MAXIMUM (1) */ 330*627096b6Sthfr 0x95, 0x04, /* REPORT COUNT (4) */ 331*627096b6Sthfr 0x05, 0x09, /* USAGE PAGE (Button) */ 332*627096b6Sthfr 0x09, 0x05, /* USAGE (Button 5) */ 333*627096b6Sthfr 0x09, 0x06, /* USAGE (Button 6) */ 334*627096b6Sthfr 0x09, 0x09, /* USAGE (Button 9) */ 335*627096b6Sthfr 0x09, 0x0a, /* USAGE (Button 10) */ 336*627096b6Sthfr 0x81, 0x02, /* INPUT (Data, Variable, Absolute */ 337*627096b6Sthfr /* Triggers */ 338*627096b6Sthfr 0x15, 0x00, /* LOGICAL MINIMUM (0) */ 339*627096b6Sthfr 0x26, 0xff, 0x03, /* LOGICAL MAXIMUM (1023) */ 340*627096b6Sthfr 0x75, 0x10, /* REPORT SIZE (16) */ 341*627096b6Sthfr 0x95, 0x02, /* REPORT COUNT (2) */ 342*627096b6Sthfr 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 343*627096b6Sthfr 0x09, 0x32, /* USAGE (Z) */ 344*627096b6Sthfr 0x09, 0x35, /* USAGE (Rz) */ 345*627096b6Sthfr 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 346*627096b6Sthfr /* Sticks */ 347*627096b6Sthfr 0x16, 0x00, 0x80, /* LOGICAL MINIMUM (-32768) */ 348*627096b6Sthfr 0x26, 0xff, 0x7f, /* LOGICAL MAXIMUM (32767) */ 349*627096b6Sthfr 0x09, 0x01, /* USAGE (Pointer) */ 350*627096b6Sthfr 0xa1, 0x00, /* COLLECTION (Physical) */ 351*627096b6Sthfr 0x95, 0x02, /* REPORT COUNT (2) */ 352*627096b6Sthfr 0x05, 0x01, /* USAGE PAGE (Generic Desktop) */ 353*627096b6Sthfr 0x09, 0x30, /* USAGE (X) */ 354*627096b6Sthfr 0x09, 0x31, /* USAGE (Y) */ 355*627096b6Sthfr 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 356*627096b6Sthfr 0xc0, /* END COLLECTION */ 357*627096b6Sthfr 0x09, 0x01, /* USAGE (Pointer) */ 358*627096b6Sthfr 0xa1, 0x00, /* COLLECTION (Physical) */ 359*627096b6Sthfr 0x95, 0x02, /* REPORT COUNT (2) */ 360*627096b6Sthfr 0x09, 0x33, /* USAGE (Rx) */ 361*627096b6Sthfr 0x09, 0x34, /* USAGE (Ry) */ 362*627096b6Sthfr 0x81, 0x02, /* INPUT (Data, Variable, Absolute) */ 363*627096b6Sthfr 0xc0, /* END COLLECTION */ 364*627096b6Sthfr 0xc0, /* END COLLECTION */ 365*627096b6Sthfr }; 366