Gast
#3254436
Hallo,
ich versuche ein HID Multimedia Keyboard (VUSB) gerade um einige Tasten
zu erweitern und nun geht nichts mehr.
Hatte bis jetzt 8 Tasten dran und nun sollen es mehr werden.
Brauche da echt etwas Hilfe.
Peter
Hier ist mal der Code:
/* Standard HID class Interface descriptor */
0x09, /* 0 bLength : Size of this descriptor, in bytes. */
0x04, /* 1 bDescriptorType : INTERFACE descriptor */
(7), /* 2 bInterfaceNumber : Index of this interface. */
0x00, /* 3 bAlternateSetting : Index of this setting. */
0x01, /* 4 bNumEndpoints : 0 endpoints. */
0x03, /* 5 bInterfaceClass : HID. */
0x00, /* 6 bInterfaceSubclass : */
0x00, /* 7 bInterfaceProtocol : Unused. */
0x00, /* 8 iInterface : Unused. (field size 1 bytes) */
/* class_descriptor hid unbekannt ?*/
0x09, /* 0 bLength : Size of this descriptor, in bytes. */
0x21, /* 1 bDescriptorType : */
0x00,0x01, /* 2 bcdHID */
0x00, /* 4 Country Code */
0x01, /* 5 bNumDescriptors */
0x22, /* 6 bDescriptorTyp */
0x24, 0x00, /* 7 wItemlength */
/* Endpoint Descriptor ( */
0x07, /* 0 bLength: 7 */
ENDPOINT, /* 1 bDescriptorType: ENDPOINT */
0x85, /* 2 bEndpointAddress (D7: 0:out, 1:in) */
0x03, /* 3 bmAttributes (bitmap) */
// 1,0, /* 4 wMaxPacketSize */
2,0, /* 4 wMaxPacketSize 2 Byte ist doch richtig oder ? */
0x0A, /* 6 bInterval */
static unsigned char hidReportDescriptor[] =
{
0x05, 0x0c, // USAGE_PAGE (Consumer Devices)
0x09, 0x01, // USAGE (Consumer Control)
0xA1, 0x01, // COLLECTION (Application)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x05, 0x0C, // USAGE_PAGE (Consumer Devices)
0x09, 0xE2, // USAGE (Mute)
0x09, 0xB3, // USAGE (Fast Forward)
0x09, 0xB4, // USAGE (Rewind)
0x09, 0xB5, // USAGE (Scan Next Track)
0x09, 0xB6, // USAGE (Scan Previous Track)
0x09, 0xB7, // USAGE (Stop)
0x09, 0xCD, // USAGE (Play / Pause)
0x09, 0x00, // USAGE (NC)
// neue 8 Befehle
0x09, 0xB0, // USAGE (Play)
0x09, 0xB1, // USAGE (Pause)
0x09, 0xE9, // USAGE (Volume Up)
0x09, 0xEA, // USAGE (Volume Down)
0x09, 0xB2, // USAGE (Record)
0x09, 0xBC, // USAGE (Repeat)
0x09, 0xB9, // USAGE (Random Play)
0x09, 0x00, // USAGE (NC)
// 0x95, 0x08, // REPORT_COUNT (8)
// 0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x10, // REPORT_COUNT (16)
0x75, 0x02, // REPORT_SIZE (2)
0x81, 0x42, // INPUT (Data,Var,Abs,Null)
0xC0 // END_COLLECTION
};