Hi,
I am a beginner and started learning more about HID. I need to develop a HID driver as a generic driver with full duplex communication.
I am able to register my device as KeyBoard (
http://www.mjmwired.net/kernel/Documentation/usb/gadget_hid.txt) with this link.
But i am not sure whether i can register as generic HID driver with full duplex comm. Following is the structure i thought off and the windows sees my device as "USB Input device" (with warning symbol ) and it fails to start with error code "10".
I also was curious how the windows device manager would show up if we configure HID driver as a generic.
Dev Environment:
Linux Kernel 2.6.35 with iMX28 processor.
I would appreciate any help?
static struct hidg_func_descriptor my_hid_data = {
.subclass = 0, /* No subclass */
.protocol = 0, /* Keyboard */
.report_length = 1024,
.report_desc_length = 43,
.report_desc = {
0x06, 0xFF00, /* USAGE_PAGE (Generic Desktop) */
0x09, 0x01, /* USAGE */
0xa1, 0x01, /* COLLECTION (Application) */
0x09, 0x01,
0x15, 0x00,
0x26, 0xFF00,
0x96, 0x04,
0x75, 0x08,
0x81, 0x02,
0x09, 0x01,
0x15, 0x00,
0x26, 0xFF,
0x96, 0x10,
0x75, 0x08,
0x91, 0x02,
0xc0 /* END_COLLECTION */
}
};
static struct usb_device_descriptor device_desc = {
.bLength = sizeof device_desc,
.bDescriptorType = USB_DT_DEVICE,
.bcdUSB = cpu_to_le16(0x0200),
/* .bDeviceClass = USB_CLASS_COMM, */
/* .bDeviceSubClass = 0, */
/* .bDeviceProtocol = 0, */
.bDeviceClass = 0xEF,
.bDeviceSubClass = 2,
.bDeviceProtocol = 1,
/* .bMaxPacketSize0 = f(hardware) */
/* Vendor and product id can be overridden by module parameters. */
.idVendor = cpu_to_le16(HIDG_VENDOR_NUM),
.idProduct = cpu_to_le16(HIDG_PRODUCT_NUM),
/* .bcdDevice = f(hardware) */
/* .iManufacturer = DYNAMIC */
/* .iProduct = DYNAMIC */
/* NO SERIAL NUMBER */
.bNumConfigurations = 1,
};